I have a custom button control and I want the client to select a button style from an enumerated range of values:
public enum BUTTONSTYLE { Style_Solid, Style_GradientA, Style_GradientB, Style_Image, Style_Liquid };
But when I try to expose it thusly:
[DefaultValue( BUTTONSTYLE.Style_Solid)]
[Category("Appearance")]
[Browsable(true)]
[Description("Sets style of the button")]
public BUTTONSTYLE newbuttonstyle
{
get
{
return newbuttonstyle;
}
set
{
newbuttonstyle = value;
}
}
Visual Studio 2005 crashes and disappears without any error messages as soon as I drag and drop the control onto a form!
It leaves nothing in the Event Log and the control disappears from the toolbox! What an I doing wrong and how do I debug this?
My button already has other (non-enum) custom properties that work just fine.
Thanks in advance for any insights.
(PS - I've been using Visual Studio 2005 since, well, 2005, and this is the fist time I've ever actually crashed it!)

New Topic/Question
Reply




MultiQuote




|