I'm trying to basically make a FlowLayoutPanel only accept a custom control that I've created that inherits a Button. So I've Shadowed the Controls property and I've created my own property, but instead of declaring it as a ControlsCollection, I've declared it as a list<of my class>:
What I'm stumped at is how check if the Items() property has been modified, that away I can call something like:
Code:
Public Shadows ReadOnly Property Controls() As ControlCollection
Get
Return MyBase.Controls
End Get
End Property
Private itms As New List(Of MenuItem)
Public Property Items() As List(Of MenuItem)
Get
Return itms
End Get
Set(value As List(Of MenuItem))
itms = value
End Set
End PropertyCode:
Me.Controls.Clear : Me.Controls.AddRange(itms.ToArray())