I have a line color property in my custom grid control. I want it to default to Drawing.SystemColors.InactiveBorder
. I tried:
[DefaultValue(typeof(System.Drawing.SystemColors), "InactiveBorder")]
public Color LineColor { get; set; }
But it doesn't seem to work. How do I do that with the default value attribute?
You need to change first argument from SystemColors
to Color
.
It seems that there is no type converter for the SystemColors
type, only for the Color
type.
[DefaultValue(typeof(Color),"InactiveBorder")]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With