以下代码在Windows Phone 8中正常工作,但是当我转换为Windows Phone 8.1时,NavigationContext无法正常工作

德维·普拉萨德(Devi Prasad)

当我尝试声明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] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章