Error in Navigation View Items Selection Changed C# in UWP App - Please help!

Avinash Kodavalla 46 Reputation points
2022-02-28T04:31:42.35+00:00

Hi Community!

Please see the below image for error info and help me solve it. I'm new to develop UWP apps in Windows. I want to redirect frames when user clicks on particular NavigationViewItem in my app.

178342-screenshot-2022-02-28-095937.png

Developer technologies | Universal Windows Platform (UWP)
{count} votes

Answer accepted by question author
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,871 Reputation points
    2022-02-28T05:46:31.47+00:00

    Hello

    Derive from your screenshot, it looks you use WInUI NavigationView to replace the UWP internal NavigationView xaml control. if you used WInUI nuget, you need to use NavigationView where under Microsoft.UI.Xaml.Controls namesapce.

    private void NavigationView_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args)  
    {  
      
    }  
    

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.