WPF 应用程序(不是浏览器)和导航 [英] WPF application (not browser) and navigation
问题描述
我想开发一个基于 WPF 的桌面应用程序.如何通过 C# 代码从一个页面导航到另一个页面或从窗口中的一个页面导航?
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?
推荐答案
查看下面的以下链接 - 这些链接将使您更好地了解通过提供示例和示例应用程序的 WPF 应用程序进行导航.
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.
我发现浏览应用程序的一个非常简单的方法是,如果您在 Window
中添加一个 Frame
,然后对于其他相应的页面,请使用 页面
和你需要在你的窗口后面做的代码如下;
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());
希望这些链接有帮助!
这篇关于WPF 应用程序(不是浏览器)和导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!