I would like to know how I can put properties within another property, as in the example below.
Example:
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:
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.