[英]WPF application (not browser) and navigation
I want to develop a desktop application based on WPF. 我想开发一个基于WPF的桌面应用程序。 How do I navigate via C# code from one page to another or from one page in a window? 如何通过C#代码从一个页面导航到另一个页面或从窗口中的一个页面导航?
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. 请查看下面的以下链接 - 这些将使您更好地了解浏览提供示例和示例应用程序的WPF应用程序。
How to Build, Manage and Navigate the User Interface of a WPF Application 如何构建,管理和导航WPF应用程序的用户界面
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; 在我找到的应用程序中导航的一种非常简单的方法是,如果您在Window
添加一个Frame
,然后在其他相应的页面中添加一个Frame
,请使用Page
,您需要在窗口后面的代码中执行以下操作:
FrameContent.Navigate(new ExampleView());
Hope these links help! 希望这些链接有帮助!
使用数据模板和ContentControl有一个简单的导航示例
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.