a bad control !!!!
-
hi all i have recently created a new simple control the problem will came up when we drop it in to the form because it will set sum unwanted properties in Form1.Designer.cs i set the Default Value for thees properties [DefaultValue("89/3/24")] and also set it in control`s constructor but the problem still persists
-
hi all i have recently created a new simple control the problem will came up when we drop it in to the form because it will set sum unwanted properties in Form1.Designer.cs i set the Default Value for thees properties [DefaultValue("89/3/24")] and also set it in control`s constructor but the problem still persists
well, [defaultValue] is not for setting initialize value for an object, it just change appearance of the property in design time,
[DefaultValue("hello")]
public string txt{get;set}now in design time when you change the text of this property it would be bold text! for ur purpose u should define ur property as this:
private string _txt="Hello"; /// ur initialize value!!!
public string txt
{
get
{
return _txt;
}
set
{
_txt=value;
}
}