G
Guest
Hi,
I'm doing a control that has a custom color property and i want to set a
default value. I tried several combinations using the DefaultValue atribute
but it didn't work. It must be a constant, so i can't do:
[DefaultValue(Color.Red)]
public Color MyColor { ... }
I also tried:
[DefaultValue(typeof(Color), "255; 0; 0")]
public Color MyColor { ... }
and it didn't work.
Thanks in advance,
Bernardo
I'm doing a control that has a custom color property and i want to set a
default value. I tried several combinations using the DefaultValue atribute
but it didn't work. It must be a constant, so i can't do:
[DefaultValue(Color.Red)]
public Color MyColor { ... }
I also tried:
[DefaultValue(typeof(Color), "255; 0; 0")]
public Color MyColor { ... }
and it didn't work.
Thanks in advance,
Bernardo