Hello !
For a while I was searching information about passing variables(strings) from one wpf form to another. But unfortunately I couldn't find what I realy need.
I have found a way to pass a string when the form is beeing declared and showed.
For example:
Private Sub test()
Dim form_to_show as new form_name
form_to_show.PassText = "Text"
form_to_show.Show()
End Sub
Public Class form_name 'this is a form which will receive passed text
Private _passedText As String
Public Property [PassedText]() As String
Get
Return _passedText
End Get
Set(ByVal Value As String)
textbox1.text = Value
End Set
End Property
End Class
Lets Say Form A is a form from which I passed text to form B in example above.
So question is how to pass text back from form B to form A ?
The thing is that I can't dim form A again.
I have also tried My.Windows.Form_A.Title = "Test" and it didn't work.
Thank You
For a while I was searching information about passing variables(strings) from one wpf form to another. But unfortunately I couldn't find what I realy need.
I have found a way to pass a string when the form is beeing declared and showed.
For example:
Private Sub test()
Dim form_to_show as new form_name
form_to_show.PassText = "Text"
form_to_show.Show()
End Sub
Public Class form_name 'this is a form which will receive passed text
Private _passedText As String
Public Property [PassedText]() As String
Get
Return _passedText
End Get
Set(ByVal Value As String)
textbox1.text = Value
End Set
End Property
End Class
Lets Say Form A is a form from which I passed text to form B in example above.
So question is how to pass text back from form B to form A ?
The thing is that I can't dim form A again.
I have also tried My.Windows.Form_A.Title = "Test" and it didn't work.
Thank You