Color property returns Color.Empty to my control

B

Brendon

I have written a custom composite control. When I try to get the value of a
Color property I always get Color.Empty in the designer, but I do get the
color that is selected when the webpage is run. Does anyone know if I have
to do something specific to get the value of the color back into the
designer? I have included the property that I am adding to the control.

Thanks,
Brendon

[Description("Display the color of the Header." ),
Category("UGEvent"),
NotifyParentProperty(true),
Bindable(true),
TypeConverter(typeof(WebColorConverter)) ]
public Color HeaderColor
{
get
{
EnsureChildControls() ;
return this._HeaderColor ;
}
set
{
EnsureChildControls() ;
this._HeaderColor = (Color) value ;

}
} //End HeaderColor
 
B

Brendon

Nope I sure didn't. Is that why it can't set the property value? Here are
the attributes I used.

[Description("Display the color of the Header." ),
Category("UGEvent"),
NotifyParentProperty(true),
Bindable(true),
TypeConverter(typeof(WebColorConverter)) ]

Thanks for the help,
Brendon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top