Using a UITypeEditor collection in a smart tag

knappster

Active member
Joined
Nov 13, 2006
Messages
42
Programming Experience
Beginner
Hi,

I have a smart tag up and running for my user control but I also want to add a UITypeEditor collection editor to it as well. If I add the collection property to the smart tag in the usual way then I get the ellipse appearing as expected, then if you click on this you get the Collection Editor pop up but if you click ok in the Collection Editor I keep getting an error:

error using the drop down: unable to cast object of type BarChartControl.BarChartActionList to type BarChartControl.BarChart

In the DesignerActionList class I have the following:

Code:
Public Property Bars() As BarChartControl.BarItemCollection
   Get
      Return _linkedControl.Bars
   End Get
   Set(ByVal value As BarChartControl.BarItemCollection)
      Dim prop As PropertyDescriptor = TypeDescriptor.GetProperties(_linkedControl)("Bars")
      prop.SetValue(_linkedControl, value)
   End Set
End Property
and in the GetSortedActionItems() of the DesignerActionList class I have:
Code:
 items.Add(New DesignerActionPropertyItem("Bars", "Bars", "Bars", "Manage bar collection."))
Anyone know what I am doing wrong here???
 
Top Bottom