Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Browsable attributes won't save

0 views
Skip to first unread message

proxyuser

unread,
Jan 4, 2010, 9:26:10 AM1/4/10
to
I have a text box (inherited) with some browsable attributes defined such as
the following. I instantiate one of these on a control, and open the
control in VS designer. At one point I set them to nondefault values (false
in this case) and that is how they are set in the designer.cs file. When I
try to change them back to true, it accepts it in the designer. I save, and
it looks like it works. When I close and open the control, the true value
is lost and they are back at nondefault values of false. The designer.cs
code also shows false. Any ideas?

[BrowsableAttribute(true)]

[CategoryAttribute("Behavior")]

[DescriptionAttribute("Specifies if decimal numbers are allowed")]

[DefaultValueAttribute(true)]

public bool AllowDecimal

{

get;

set;

}


Slavic Schupak

unread,
Jan 6, 2010, 1:06:46 PM1/6/10
to
Use this attribute, it alone says to VS Designer to serialize your property,
other which you've specified, act only when designer is opened, not
influencing the code in *.Designer.cs file
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]

0 new messages