WPF application (not browser) and navigation

前端 未结 2 1664
星月不相逢
星月不相逢 2021-02-15 14:56

I want to develop a desktop application based on WPF. How do I navigate via C# code from one page to another or from one page in a window?

相关标签:
2条回答
  • 2021-02-15 15:35

    Take a look at the following links below - these will give you a better understanding of navigating through a WPF application providing examples and sample apps.

    How to Build, Manage and Navigate the User Interface of a WPF Application

    Simple Navigation

    More advanced Navigation

    A really easy way to navigate through an application I find is that if you add a Frame within a Window and then for your other corresponding pages, use Page and you need to do in the code behind of your window is as follows;

    FrameContent.Navigate(new ExampleView());
    

    Hope these links help!

    0 讨论(0)
  • 2021-02-15 15:41

    There is simple example of navigation by using Data Templates and ContentControl

    0 讨论(0)
提交回复
热议问题