|
| DefaultValueAttribute |
|
|
|
|
| Messages |
|
Related Types |
This message was discovered on microsoft.public.dotnet.languages.csharp.
| Dulovits M. |
| GOOD ANSWER |
I want a default value for this color property ( with System.ComponentModel.DefaultValue ) but it doesnt work .. any hints or ideas what ive done wrong ??
[System.ComponentModel.Category("Border")] [System.ComponentModel.DefaultValue(typeof System.Drawing.Color),"Yellow")] [System.ComponentModel.Description("Color of the BorderGradient.")]
public System.Drawing.Color GradientColor { get ... set ... }
thx in advance
dulo
|
|
|
| |
|
|
| |
| |
| Vijaye Raji |
The attribute is just a hint. It lets others understand about the default value for the property - for example, the property grid will use the DefaultValue attribute to let users reset it.
If you want your property to have an initial value, you need to explicitly set it in the constructor.
HTH
-vJ
"Dulovits M." <Click here to reveal e-mail address> wrote in message news:c9nmco$a33$Click here to reveal e-mail address... [Original message clipped]
|
|
|
| |
|
| |
|
|
|
|
|
|
|
|
BootFX
Reliable and powerful .NET application framework. |
|
|
|
|
|
|