开发者

How to pass a value from a normal PhoneApplication page to a ChildWindow page in Wp7?

How to pass a values form a normal page(MainPage.xaml) which is a PhoneApplication page to ChildWindow page(which is silverlight control) ?

The be开发者_如何学运维low syntax used to pass values normally is not working:

In Mainpage.xaml:

NavigationService.Navigate(new Uri("/Xy.xaml?message=" + Message, UriKind.Relative));

In Xy.xaml :

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
    if (this.NavigationContext.QueryString.ContainsKey("message"))
    {
                   //do this
    }
}

Here the NavigationContext is not working !!

Is there an option to read the values in the Childwindow page ??

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜