[UWP]将Var中的数据传递到单个XAML客户页面 [英] [UWP]Passing data from a Var into a single XAML customer page
问题描述
首先抱歉是一个完整的菜鸟,很可能不知道正确的术语。
First off sorry for being a complete noob and most likely not know the correct terminology.
我想创建的内外办公室数据库管理项目并在现场进行检查。
What I am trying to create as a in and out off office database to manage projects and carry out the inspections in field.
我使用Azure移动应用程序作为后端,而天蓝色移动应用程序调用
I am using Azure Mobile App as the backend and the azure mobile app calls
我是目前正在苦苦挣扎的是从列表视图中打开一条记录,以便进行编辑和保存
I am currently struggling with is opening a single record from a list view so it can be edited and saved
到目前为止,我已经解决了如何将Id从listview传递到singleview页面并使用LookupAsync()
I have worked out so far, is how to pass the Id from the listview into the singleview page and use LookupAsync()
当我使用断点时,我可以看到所有信息都在"items"中。但我无法将其传递给XAML页面。
When I use a breakpoint I can see all the info is in "items" but I cant pass it through to the XAML page.
这里是代码
protected override async void OnNavigatedTo(NavigationEventArgs e)
{
var projects = e.Parameter as Projects;
var items = await projectsTable.LookupAsync(projects.Id);
请帮助
推荐答案
所以看来你试图用参数导航到另一个页面,对吗?
So it seems that you are trying to navigate to a different page with a parameter, right?
如果你需要传递数据,你需要将数据设置为
Frame.Navigate方法。
If you need to pass data, you need to set the data as a parameter of the Frame.Navigate Method.
像这样:
Frame.Navigate(typeof(YourPage), parameter);
祝你好运,
Roy
这篇关于[UWP]将Var中的数据传递到单个XAML客户页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!