D
David Veeneman
I'm backporting a component to .NET 1.x, and it required me to use a custom
collection, StringList, instead of List<string>. StringList is derived from
CollectionBase and is marked serializable.
Here's my problem: I can't get design-time property values to persist. Here
is my property declaration:
[Browsable(true)]
[Category("Data")]
[Description("The text to be shown for each link level while in its active
state")]
[Editor("System.Windows.Forms.Design.StringCollectionEditor, System.Design",
"System.Drawing.Design.UITypeEditor, System.Drawing")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Visible)]
[EditorBrowsable(EditorBrowsableState.Always)]
public StringList ActiveTextList
{
get { return p_ActiveTextList; }
set { this.SetActiveTextListProperty(value); }
}
I thought I had the attributes required to serialize the property, but I
guess I'm missing something.
Can anyone shed some light on this? How come my property value isn't
persisting? Thanks.
collection, StringList, instead of List<string>. StringList is derived from
CollectionBase and is marked serializable.
Here's my problem: I can't get design-time property values to persist. Here
is my property declaration:
[Browsable(true)]
[Category("Data")]
[Description("The text to be shown for each link level while in its active
state")]
[Editor("System.Windows.Forms.Design.StringCollectionEditor, System.Design",
"System.Drawing.Design.UITypeEditor, System.Drawing")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Visible)]
[EditorBrowsable(EditorBrowsableState.Always)]
public StringList ActiveTextList
{
get { return p_ActiveTextList; }
set { this.SetActiveTextListProperty(value); }
}
I thought I had the attributes required to serialize the property, but I
guess I'm missing something.
Can anyone shed some light on this? How come my property value isn't
persisting? Thanks.