当我尝试声明NavigationContext时,我在Windows Phone 8.1中遇到错误
public static string GetFeedbackMailMessage(NavigationContext context)
{
string VideoTitle = string.Empty;
string LinkType = string.Empty;
string VideoUrl = string.Empty;
string ShowTitle = string.Empty;
string FeedbackMessage = string.Empty;
context.QueryString.TryGetValue("chno", out VideoTitle);
context.QueryString.TryGetValue("LinkType", out LinkType);
context.QueryString.TryGetValue("uri", out VideoUrl);
context.QueryString.TryGetValue("title", out ShowTitle);
if (context.QueryString.TryGetValue("chno", out VideoTitle) && context.QueryString.TryGetValue("LinkType", out LinkType) && context.QueryString.TryGetValue("uri", out VideoUrl) && context.QueryString.TryGetValue("title", out ShowTitle))
{
FeedbackMessage = "Movie Name : " + ShowTitle + "\n" + VideoTitle + " \n " + "http://m.youtube.com/watch?v=" + VideoUrl + "\n";
}
return FeedbackMessage;
}
试试这个
string ShowTitle = NavigationContext.QueryString["title"];
还要检查此内容:http : //mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2014/05/23/windows-phone-8-1-frame-page-navigationhelper-suspensionmanager.aspx
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句