Well, I've made it to the point where I can make it do one of two things:
1. I can make it expand to show the properties, but it doesn't add anything
to the *.aspx file, so bothering to set the properties is kind of pointless.
2. I can make it automatically display all the properties in the Property
Grid as ObjectName-PropertyName, which allows me to edit them as if they
were individual properties. However, I would like the properties to be
expandable. Here is the basic code I currently have which makes it do what I
just mentioned:
Public Class MyClass
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)>
Public Property MyProperty() As MyType
End Property
End Class
<TypeConverter(GetType(System.ComponentModel.ExpandableObjectConverter)),
Serializable()> Public Class MyType
<RefreshProperties(RefreshProperties.All), NotifyParentProperty(True)>
Public Property Prop1 as String
<RefreshProperties(RefreshProperties.All), NotifyParentProperty(True)>
Public Property Prop2 as String
<RefreshProperties(RefreshProperties.All), NotifyParentProperty(True)>
Public Property Prop3 as String
<RefreshProperties(RefreshProperties.All), NotifyParentProperty(True)>
Public Property Prop4 as String
End Class
This causes the Property Grid to show:
MyProperty-Prop1
MyProperty-Prop2
MyProperty-Prop3
MyProperty-Prop4
I am looking to have it show something like:
+MyProperty
Prop1
Prop2
Prop3
Prop4
Both ways should use attributes of the format ObjectName-PropertyName to add
the values to the control in the *.aspx file, but I want Visual Studio
should display it in the Property Grid using the expandable format. Can
anybody help me here? Thanks.