misterstick
Programmer
i have a control derived from UserControl.
one of the rocket scientists at microsoft decided that the Text property on a UserControl wasn't needed in the designer and would never be serialised, and so turned it off.
i've turned it back on again, and changing the value in the properties page changes the value in the designer.
for the life of me, though, i can't get it to serialise into the .designer.cs of forms that use it, so that closing the form and opening it again loses the value.
any ideas?
mr s. <
one of the rocket scientists at microsoft decided that the Text property on a UserControl wasn't needed in the designer and would never be serialised, and so turned it off.
i've turned it back on again, and changing the value in the properties page changes the value in the designer.
for the life of me, though, i can't get it to serialise into the .designer.cs of forms that use it, so that closing the form and opening it again loses the value.
Code:
public class MyUserControl : UserControl
{
[EditorBrowsable(EditorBrowsableState.Always)]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Localizable(true)]
public new string Text
{
// using a contained label to display text
get { return label.Text; }
set { label.Text = value; }
}
}
any ideas?
mr s. <