当我尝试声明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;
}
答案 0 :(得分:0)
试试这个
string ShowTitle = NavigationContext.QueryString["title"];