Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Windows Phone 8.1-VB.NET中将数据发送到另一个xaml_Vb.net_Xaml_Windows Phone 8_Visual Studio 2015_Windows Phone 8.1 - Fatal编程技术网

在Windows Phone 8.1-VB.NET中将数据发送到另一个xaml

在Windows Phone 8.1-VB.NET中将数据发送到另一个xaml,vb.net,xaml,windows-phone-8,visual-studio-2015,windows-phone-8.1,Vb.net,Xaml,Windows Phone 8,Visual Studio 2015,Windows Phone 8.1,如何使一个xaml中的变量(单击按钮时)显示在文本框中的另一个xaml中。 基本上,在Menu.xaml中单击按钮后,name变量将显示在Basket.xaml中的文本框中。我该怎么做呢 菜单中的按钮。xaml Private Sub VanButton_Click(sender As Object, e As RoutedEventArgs) Handles VanButton.Click Dim Name As String = "Vanilla" End Sub 在菜单中单击按

如何使一个xaml中的变量(单击按钮时)显示在文本框中的另一个xaml中。 基本上,在Menu.xaml中单击按钮后,name变量将显示在Basket.xaml中的文本框中。我该怎么做呢

菜单中的按钮。xaml

 Private Sub VanButton_Click(sender As Object, e As RoutedEventArgs) Handles VanButton.Click
    Dim Name As String = "Vanilla"
End Sub
在菜单中单击按钮后,将变量名放入Basket.xaml文本框。xaml

Private Sub IcecreamChosen_TextChanged(sender As Object, e As TextChangedEventArgs) Handles IcecreamChosen.TextChanged

End Sub

该应用程序是在VB.NET Visual Studio 2015中开发的。我是新手,不知道如何让它以这种方式工作

您必须为文本框指定一个名称,然后在按钮单击事件句柄中,您可以编写您的文本框名称。Text=variabile

无论如何,我建议您开始使用数据绑定方法。Xaml是基于数据绑定的!:)