在解析URI ShellTile参数在Windows Phone 7 [英] Parse URI Arguments on ShellTile on Windows Phone 7

查看:143
本文介绍了在解析URI ShellTile参数在Windows Phone 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在开发我的第一个Windows Phone 7应用程序的过程。我freshfaced到Silverlight中,C#和.NET整个场景,但我喜欢把我正在做体面的进步。

I'm in the process of developing my first Windows Phone 7 Application. I'm freshfaced to Silverlight, C# and the whole .NET Scene, but I like to think I'm making decent progress.

我知道,从不同code的例子,我可以用ShellTile设置瓦。我知道我可以通过PARAMS与URI(就像这个例子):

I know from various code examples, I can set the tile using ShellTile. I know I can pass through params with the URI (Like this example):

ShellTile.Create(new Uri("/MainPage.xaml?DefaultTitle=FromSecondaryTile", UriKind.Relative), tile );

任何人都可以点我的方向(或解释),我怎么能处理的参数从瓦通过呢?因此,瓷砖的开放的时候,我想打开应用程序的某一部分。

Can anyone point me in the direction (or explain) how I can handle arguments passed from the tile? So, when the tile's open, I'd like to open a certain part of the application.

有关的记录,我知道我能为每一个来处理这种方式创建一个单独的页面,但我可以看到,越来越凌乱快:)

For the record, I'm aware I could create a separate page for each one to handle it that way, but I can see that getting messy fast :)

谢谢! 迈克

推荐答案

这很适合我的特定目的的一种方法,我已经找到了,就是XAML页面,这简直之间传递值时相同的方法,通过传递他们查询字符串:     NavigationContext.QueryString [XXXXX]的ToString()。

A way I've found that works well for my particular purpose, is the same means of passing values between xaml pages, which is simply to pass them through in the query string: NavigationContext.QueryString["XXXXX"].ToString();

其中XXXXX是键/名称对这个名字。

Where XXXXX is the name in the key/name pair.

这篇关于在解析URI ShellTile参数在Windows Phone 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆