DefaultValue on SystemColor doesn't work?

  • Thread starter Thread starter Iulian Ionescu
  • Start date Start date
I

Iulian Ionescu

I have a property of type Color and it's default value is
SystemColors.Control. I put this:

[DefaultValue(typeof
(System.Drawing.SystemColors), "Control")]

but the value still shows bolded (like if it is not
default) and when I right click and choose Reset it turns
to Color.Empty instead of Control. I also have a
ResetProperty and a ShouldSerializeProperty but the Reset
is not called when the reset is done...

Any help? thank you!
 
I figured this one out.... I had to use Color instead of
SystemColors:

[DefaultValue(typeof(Color), "Control")]
 
Back
Top