Navigating between pages in an event handler in windows 8.1 app with XAML/C#


  • Hello,

    In the view of my app, I have defined the following in XAML segment in "CurrentPage.xaml",

                    <core:DataTriggerBehavior Binding="{Binding Path=Token}">
                        <core:NavigateToPageAction TargetPage="NextPage" />

    where I have a public exposed property called "Token" in my ViewModel class "CurrentPageViewModel.cs"

    private string _Token;
    public string Token
                    return this._Token;
                    this._Token= value;                

    When the Token Property is modified, I notify it using the NotifyPropertyChanged() method. I am afraid that the page navigation to NextPage is not happening. Instead it gets stuck in CurrentPage itself.

    I wondered is there anything that I am missing out? I am using a MVVM kind of architecture for the same. All the data context binding have been correctly done and tested.

    Thanks in advance for any help.



    Friday, July 04, 2014 3:36 AM

All replies

  • Hi Sriram, Can you please post complete code sample that can be used to replicate the issue and help?

    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you. Happy Coding!!!

    Friday, July 04, 2014 7:21 AM