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!

DefaultValue on SystemColor doesn't work? by Iulian

Iulian
Wed Oct 15 10:18:53 CDT 2003

I figured this one out.... I had to use Color instead of
SystemColors:

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


>-----Original Message-----
>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!
>
>.
>