R
Ryan Liu
Hi,
What is the best practise to sove this problem:
property with defalut value will not be called in auto-generated code
?
for example
there is a property in a user control
private bool normalMode = false;
public bool NormalMode
{
get
{
return this.normalMode ;
}
set
{
SetAsNormal(value);
this.normalMode = value;
}
If I put this user control in a form, in forms InitializeComponent(), there
is no code like
userControl1.NormalMode = false;
so line like SetAsNormal(value); will not be called.
What is the best way to solve this? And how to make a property only visible
at design time?
Thanks a lot!
Ryan Liu
What is the best practise to sove this problem:
property with defalut value will not be called in auto-generated code
?
for example
there is a property in a user control
private bool normalMode = false;
public bool NormalMode
{
get
{
return this.normalMode ;
}
set
{
SetAsNormal(value);
this.normalMode = value;
}
If I put this user control in a form, in forms InitializeComponent(), there
is no code like
userControl1.NormalMode = false;
so line like SetAsNormal(value); will not be called.
What is the best way to solve this? And how to make a property only visible
at design time?
Thanks a lot!
Ryan Liu