问题描述
嗨MSDN我在2012年的Visual Studio中做了一个wp8应用程序。
我有一个问题,即添加一个代码来重定向我的页面在main.xaml.cs中按钮单击我的about.xaml页面。
这里是我写的代码。
这是shell的main.xaml代码。
< phone:PhoneApplicationPage.ApplicationBar>
< shell:ApplicationBar IsVisible =" True" IsMenuEnabled = QUOT;真">
< shell:ApplicationBarIconButton x:Name =" about"
IconUri =" /Images/appbar.at.rest.png"
Text =" About"
Click =" about_Click" />
< shell:ApplicationBarIconButton x:Name =" Rate"
IconUri =" /Images/appbar.heart2.empty.rest.png"
Text =" rate"
Click =" rate_Click" />
< / shell:ApplicationBar>
< / phone:PhoneApplicationPage.ApplicationBar>
并且main.xaml.cs代码是这样的:
私有子about_Click(发件人为对象,e为RoutedEventArgs)
结束子
私有子rate_Click(发件人为对象,e为RoutedEventArgs)
End Sub
以下是我必须编写的导航代码是什么当我点击shell中的about图标时,到about.xaml。
即我必须在这两行之间写一下。
请回复我是这种语言的新手,所以我很困惑。
Private Sub rate_Click(sender as Object,e As RoutedEventArgs)
End Sub
Hi MSDN I was doing a wp8 app in visual studio 2012.
I got a prob of adding a code to redirect my page in main.xaml.cs after a button click to my about.xaml page.
here is the code i have written.
This is the main.xaml code for a shell.
<phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True"> <shell:ApplicationBarIconButton x:Name="about" IconUri="/Images/appbar.at.rest.png" Text="About" Click="about_Click"/> <shell:ApplicationBarIconButton x:Name="Rate" IconUri="/Images/appbar.heart2.empty.rest.png" Text="rate" Click="rate_Click"/> </shell:ApplicationBar> </phone:PhoneApplicationPage.ApplicationBar>
And the main.xaml.cs code was like this:
Private Sub about_Click(sender As Object, e As RoutedEventArgs) End Sub Private Sub rate_Click(sender As Object, e As RoutedEventArgs) End Sub
Here is the prob what is the code i have to write to navigate to about.xaml when i click on the about icon in the shell.
i.e what i have to write between these two lines.
please reply i was new to this language so i was so confused.
Private Sub rate_Click(sender As Object, e As RoutedEventArgs) End Sub
这篇关于重定向到vb.net中的下一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!