I created a UserControl. This UserControl contains a Panel which contains a ListBox. This is so I can draw a custom border for the ListBox. I am exposing the ListBox's Items property like so:
vb.net Code:
<Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", GetType(Drawing.Design.UITypeEditor)), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _ ReadOnly Property Items As System.Windows.Forms.ListBox.ObjectCollection Get Return DirectCast(lb.Items, ListBox.ObjectCollection) End Get End Property
This is how it is declared in Reflector. However, whenever I edit the collection using the designer's property editor, the items do not show up in the ListBox. Please note that I am able to add items and make them appear properly at runtime.
How would I get the items to appear in the ListBox at design time?




Reply With Quote