[英]Page, Frame, Navigation windows in C# WPF
thank you 谢谢
A Page
is much like a user control, only that is is displayed within a Frame
, which again is part of a NavigationWindow
. Page
很像用户控件,只有在Frame
内显示,这也是NavigationWindow
一部分。 A NavigationWindow
is a special kind of window that allows for page navigation and can display the respective controls for navigating pages. NavigationWindow
是一种特殊的窗口,允许页面导航并可以显示导航页面的相应控件。
A paged application is a good choice if you want Wizard-like functionality, or if the user experience should be comparable to what you get when browsing the web. 如果您想要类似向导的功能,或者用户体验应与浏览网页时的用户体验相当,则分页应用程序是一个不错的选择。 In many cases, using standard WPF windows is a better choice.
在许多情况下,使用标准WPF窗口是更好的选择。
The NavigationWindow
already contains a "fixed part" that can contain controls. NavigationWindow
已包含可包含控件的“固定部件”。 You can also use a normal window, place a Frame
in it and then - through proper layout - create your own "fixed parts". 您还可以使用普通窗口,在其中放置
Frame
,然后 - 通过适当的布局 - 创建自己的“固定部件”。 Navigation would then come down to calling the navigation methods the Frame
provides. 然后导航将调用
Frame
提供的导航方法。
From the answer to this question : 从这个问题的答案:
Pages are intended for use in navigation applications (usually with back and forward buttons, eg Internet Explorer).
页面旨在用于导航应用程序(通常使用后退和前进按钮,例如Internet Explorer)。 Pages must be hosted in a
NavigationWindow
or aFrame
页面必须托管在
NavigationWindow
或Frame
The best choice depends on what kind of application you want to create. 最佳选择取决于您要创建的应用程序类型。 Is it a wizard or navigation type application or just a regular application with one window (maybe with tabs)?
它是一个向导或导航类型的应用程序,还是只有一个窗口的常规应用程序(可能带有标签)?
I would definitely consider using a MVVM framework like Caliburn.Micro for making a WPF application. 我肯定会考虑使用像Caliburn.Micro这样的MVVM框架来制作WPF应用程序。 It has some really powerful mechanisms for dealing with Screens, Conductors and Composition , in addition to encouraging you to decouple your application by using the MVVM pattern.
除了鼓励您使用MVVM模式解耦应用程序之外,它还有一些非常强大的机制来处理Screens,Conductors和Composition 。 The author of Caliburn.Micro, Rob Eisenberg, has written some tutorials with extensive explanation about and how to use the framework under the project's documentation .
Caliburn.Micro的作者Rob Eisenberg撰写了一些教程,详细解释了如何在项目文档下使用该框架。 There is also lots of resources around the interwebz, google it!
在interwebz周围还有很多资源,谷歌吧! :)
:)
I can also recommend Pluralsight's WPF and XAML Fundamentals and WPF Advanced Topics , they should cover what whatever is worth knowing about WPF :) 我还可以推荐Pluralsight的WPF和XAML基础知识以及WPF高级主题 ,它们应该涵盖了什么值得了解WPF :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.