How do I put properties inside another property? VB.net

1

I would like to know how I can put properties within another property, as in the example below.

Example:

Open / Expanded Font Property

I tried to do many times in many ways, but the closest I got was the one below:

Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Design
Imports System.ComponentModel

Namespace ClassTest_ParentProperty

Public Class Class_Parent : Inherits Control
        Public Property MyProperties_Parent As Class_Child


        Public Sub New()
            MyBase.BackColor = Color.DarkSlateBlue
        End Sub
    End Class

    Public Class Class_Child
        Public Var_MyColor As Color = Color.Empty
        Public Var_MyText As New String(Nothing)
        Public Var_MySize As New Size(50, 50)

        Public Property MyColor As Color
            Get
                Return Var_MyColor
            End Get
            Set(value As Color)
                Var_MyColor = value
            End Set
        End Property

        Public Property MyText As String
            Get
                Return Var_MyText
            End Get
            Set(value As String)
                Var_MyText = value
            End Set
        End Property

        Public Property MySize As Size
            Get
                Return Var_MySize
            End Get
            Set(value As Size)
                Var_MySize = value
            End Set
        End Property

    End Class
End Namespace

But with this attempt I only got what is represented below:

Property that does not expand

I searched for several hours for about 3 days but did not find what I wanted. So I hope someone can teach me how I can do it.

    
asked by anonymous 02.07.2017 / 14:32

1 answer

1

Place attributes of the designer types that come from the .NET library itself.

References:

Imports System.ComponentModel

Class declaration Class_Child :

<Browsable(True)>
Public Class Class_Child

Property declaration:

<Browsable(True)>
<Description("Descrição não é necessária."), Category("Appearance")> ' Categoria da propriedade
<EditorBrowsable(EditorBrowsableState.Always)>
Public Property MyProperties_Parent As Class_Child
    
07.07.2017 / 21:13