如何从Windows Phone中的导航表单中获取变量的值?

时间:2014-04-13 08:01:23

标签: vb.net windows-phone-8

由于Windows手机表单不是模态的, 如何获得在ColorPicker.xaml中设置的所选颜色的值?

    Dim FirstBand As Res.Color
    Dim SecondBand As Res.Color

       Private Sub TextBlock_Tap(sender As Object, e As GestureEventArgs)
            NavigationService.Navigate(New Uri("/ColorPicker.xaml", UriKind.Relative))
            FirstBand = ColorPicker.SelectedColor
            txtFisrt.Text = FirstBand.ToString
        End Sub

        Private Sub TextBlock1_Tap(sender As Object, e As GestureEventArgs)
            NavigationService.Navigate(New Uri("/ColorPicker.xaml", UriKind.Relative))
            SecondBand = ColorPicker.SelectedColor
            txtSecond.Text = SecondBand.ToString
        End Sub

1 个答案:

答案 0 :(得分:0)

您可以使用url或在Static类或App类中设置一些静态值。