您的位置:首页 > 其它

wp7 页面导航传值和在Tombstoning之后保存状态保存状态

2013-02-07 21:31 309 查看
const string CurrentEntryDateKey = "CurrentEntryDateKey";

//If we return to this page after Tomstoning, then get the previous state from
// PhoneApplicationService
if (PhoneApplicationService.Current.State.ContainsKey(CurrentEntryDateKey))
_entryDate = (DateTime)PhoneApplicationService.Current.State[CurrentEntryDateKey];


在xaml中导航使用&时需要用转义字符,& 如:<HyperlinkButton NavigateUri="/ChildPage/Video.xaml?param1=视频&param2=参数2">

而在后台则不用

NavigationService.Navigate(new Uri("/ChildPage/Music.xaml?"+ "param1=" + TextBox1.Text + "¶m2=" + TextBox2.Text , UriKind.Relative));
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: