更改Raspberry Pi 3,Visual Studio的页面代码 [英] Changing Page Code for Raspberry Pi 3, Visual Studio
问题描述
我是编程Raspberry的新手。 (Windows 10 IOT)
我使用Visual Studio Universal,使用"Debug,ARM,Remote Machine"上传代码。通过使用WI-FI,一切都很简单,直到我需要放置一个"更改屏幕"。或"下一个屏幕"或按钮。
我想,当我点击按钮并传递给它的属性部分时,会有一个命令。但不,我猜。
private void Next_Click(对象发送者,RoutedEventArgs e)
{
//导航到相应的目的地页面,通过传递所需信息作为导航参数来配置新页面$
//
我应该在上面放置什么代码呢?感谢您的关注。
亲爱的朋友,
首先,您可以向项目添加新页面(例如BlankPage1)。
其次,您可以在
Next_Click 将您的应用导航到新的添加了页面(BlankPage1 ),如下所示:  
      private void Next_Click(object sender,RoutedEventArgs e)
      {
          this.Frame.Navigate(typeof(BlankPage1));
      }
最后,不要忘记将此命名空间添加到您的应用程序中:
使用Windows.UI.Xaml.Navigation;
有关详细信息,请参阅MSDN上的此页: 两页之间的点对点导航
祝你好运!
I'm quite new for programming Raspberry. (Windows 10 IOT)
I use Visual Studio Universal, upload codes with "Debug, ARM, Remote Machine" by using WI-FI and everything was simple until I needed to put a "change screen" or "next screen" button.
I thought, when I click on the button and pass to its properties part, there would be a command for it. But no, I guess.
private void Next_Click(object sender, RoutedEventArgs e)
{
// Navigate to the appropriate destination page, configuring the new page
// by passing required information as a navigation parameter
}
What codes should I put above, then? Thanks for your attention.
Dear friend,
First, you can add a new page (BlankPage1 for example) to your project.
Second, you may use Frame.Navigate method in the Next_Click to navigate your app to the new added page(BlankPage1 ) as follows:
private void Next_Click(object sender, RoutedEventArgs e)
{
this.Frame.Navigate(typeof(BlankPage1));
}Last, do not forget to add this namespace to your application:
using Windows.UI.Xaml.Navigation;
For more information, please refer to this page on MSDN: Peer-to-peer navigation between two pages
Good luck!
这篇关于更改Raspberry Pi 3,Visual Studio的页面代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!