3
我有兩個WPF
頁面打開,我想從第二頁發送「textbox3.text」到「textbox1.text」在第1頁從一個頁面傳遞數據到另一個頁面WPF VB.Net
在VB中,很容易:
page1.textbox1.text = texbox3.text
,但我不能找出如何做,在WPF
我有兩個WPF
頁面打開,我想從第二頁發送「textbox3.text」到「textbox1.text」在第1頁從一個頁面傳遞數據到另一個頁面WPF VB.Net
在VB中,很容易:
page1.textbox1.text = texbox3.text
,但我不能找出如何做,在WPF
我想你可以創建一個第1頁屬性包含的值,其在文本框中
Public ReadOnly Property TextBox1Value() As String
Get
Return theFirstTextBox.Text
End Get
End Property
而得到這個值,並將其傳遞到第二頁的構造例如
Public Sub New(ByVal value As String)
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
theSecondTextBox.Text = value
End Sub
Private Sub CreatePage2Method()
Dim page As Page2 = New Page2("BlaBlaBla")
NavigationService.Navigate(page)
End Sub
祝你好運!