I have a control, control1, with the attributes such as DefaultValue, Category and Browsable set.
I have a user control that includes control1 and exposes some of the properties. Is the correct way to refer to the attributes in control1, without duplicating them all, to use the AttributeProviderAttribute?
<AttributeProvider("AssemblyQualifiedName Of Control1", "ColorProperty")> _
Public Property ColorProperty() As String
....
End Property
If so, why is it neccessary to hardcode the name of the control1 class name? There is no AttributeProviderAttribute constructure that takes a Type and a PropertyName.
I've subclassed AttributeProviderAttribute and added:-
Public Sub New(ByVal type As Type, ByVal propertyName As String)
MyBase.New(type.AssemblyQualifiedName, propertyName)
End Sub
But it doesn't work. It compiles fine, but the property grid isn't picking up the attributes.