Carsten Ilwig
2009-08-07 06:38:14 UTC
Hi,
is there a way to set the defaultvalue from a property to TRUE?
Example:
public class ComboBoxMy : System.Windows.Forms.ComboBox
{
[DefaultValue(true)]
public bool UseDefaultFont { get; set; }
}
If I place the control of my form, the property "UseDefaultFont" is "FALSE".
The value is bold, because the designer realised that "FALSE" isn't the
defaultvalue.
What I have to do, that the designer set the value of "TRUE"?
Thanks for your answers.
Carsten
is there a way to set the defaultvalue from a property to TRUE?
Example:
public class ComboBoxMy : System.Windows.Forms.ComboBox
{
[DefaultValue(true)]
public bool UseDefaultFont { get; set; }
}
If I place the control of my form, the property "UseDefaultFont" is "FALSE".
The value is bold, because the designer realised that "FALSE" isn't the
defaultvalue.
What I have to do, that the designer set the value of "TRUE"?
Thanks for your answers.
Carsten