Hi all!
I have a Windows Forms User control, and it has a System.Collections.Generic.List <Label> property. When I build the User Control it builds successfully.
I have a test Windows Form where I have an instance of this User Control. In the PropertyGrid of the user control instance, I see [...] button against the property, and on clicking this periods button, it opens the CollectionEditor, and it adds Label type entries when I click the Add button. I can remove the entries by clicking the Remove button.
But, when I return from the CollectionEditor, the property grid does not show any entries that were added earlier in the CollectionEditor. I can go to the CollectionEditor any number of times, add or remove Label entries, but when it returns to the Property Grid, there won't be any entry persisted by the editor.
Please let me know if there is a way to fix this problem!!!
The code snippet for the User Control is added below:
public partial class DemoUserControl : System.Windows.Forms.UserControl
{
private List <Label> mv_labelsList = null;
public List <Label> LabelsList
{
get { return (mv_linkLabelsList); }
set { mv_linkLabelsList = value; }
}
}
Thanks,
Dinesh Jayadevan