Windows手机WNS通知导航到特定页面

时间:2015-02-17 21:38:35

标签: c# azure windows-phone windows-phone-8.1

它是Windows运行时,Windows手机目标项目。

我使用的是Azure和Azure通知中心。所以我的问题是有没有人如何导航到某个特定页面并发送像id这样的参数。

这是我的toast模板,如字符串中描述的那样:

   var toast = @"<toast><visual><binding template=""ToastText01""><text id=""1"">" + datatoshow + "</text></binding></visual></toast>";

我应该使用raw或其他通知类型。非常感谢。

此链接对我的问题没有帮助:

https://msdn.microsoft.com/en-us/library/windows/apps/hh761494.aspx

1 个答案:

答案 0 :(得分:5)

更好的文档页面是Quickstart: Sending a toast notification的指定启动参数段。引用位于toast element定义中。

将toast元素的launch属性设置为一个字符串,该字符串在激活时将传递给应用程序。然后,应用程序可以根据该字符串进行切换。

var toast = @"<toast launch=""?page=foo&id=7""><visual><binding template=""ToastText01""><text id=""1"">" + datatoshow + "</text></binding></visual></toast>";