P
Peter
Hello all,
How can I make some extra properties for a UserControl ?
In Form1 there is panel1 in which the UserControl is made visible:
the UserControl is created by simply add new UserControl to my app. and
looks like a form on which I can place controls.
Want to create extra properties for the UserControl but these properties are
unknown in Form1.
Can somebody help me how I get this done if possible ?
Thanks,
Peter.
// Form1 :
public Control myUsrCtrl = new UsrCtrl();
this.panel1.Controls.Add(myUsrCtrl);
myUsrCtrl.Visible = true;
// UserControl :
public partial class UsrCtrl : UserControl
{
private Color myColor = Color.White
public Color MyColor
{
get { return myColor; }
set { myColor = value; }
}
How can I make some extra properties for a UserControl ?
In Form1 there is panel1 in which the UserControl is made visible:
the UserControl is created by simply add new UserControl to my app. and
looks like a form on which I can place controls.
Want to create extra properties for the UserControl but these properties are
unknown in Form1.
Can somebody help me how I get this done if possible ?
Thanks,
Peter.
// Form1 :
public Control myUsrCtrl = new UsrCtrl();
this.panel1.Controls.Add(myUsrCtrl);
myUsrCtrl.Visible = true;
// UserControl :
public partial class UsrCtrl : UserControl
{
private Color myColor = Color.White
public Color MyColor
{
get { return myColor; }
set { myColor = value; }
}