How can the properties of constituent controls in a VB Windows Forms UserControl be made available for use in ApplicationSettings?
I created a UserControl with a Textbox. I would like to make TextBox1.Text available for use with My.Settings via ApplicationSettings, but it does not appear in the list. I also created a property to wrap it, but that also does not appear in the list.
How do I do this?
In example and screenshot below, neither ‘TextBox11’ nor the user-defined property ‘UserControlText’ are found in the Application Settings list.
Imports System.ComponentModel
Public Class UserControl1
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)>
Public Property UserControlText() As String
Get
Return TextBox1.Text
End Get
Set(value As String)
TextBox1.Text = value
End Set
End Property
End Class