当您在解决方案资源管理器中添加新文件时,WPF中的页面和窗口之间有什么区别?
当前回答
一个窗口总是独立显示,一个页面是要显示在一个框架或在一个导航窗口。
其他回答
主要的区别是窗口是完整的作为一个整体,不能包含在一个页面,但反之亦然。页面用于在同一窗口中为用户提供不同的选项卡。
见附图
页面控件可以包含在窗口控件中,反之则不可能
You can use Page control within the Window control using NavigationWindow and Frame controls. Window is the root control that must be used to hold/host other controls (e.g. Button) as container. Page is a control which can be hosted in other container controls like NavigationWindow or Frame. Page control has its own goal to serve like other controls (e.g. Button). Page is to create browser like applications. So if you host Page in NavigationWindow, you will get the navigation implementation built-in. Pages are intended for use in Navigation applications (usually with Back and Forward buttons, e.g. Internet Explorer).
WPF使用Page类在独立应用程序中提供浏览器样式导航的支持。用户可以创建多个页面,在这些页面和数据之间导航。有多种方法可以从一个页面导航到另一个页面。
一个窗口总是独立显示,一个页面是要显示在一个框架或在一个导航窗口。
页面用于导航应用程序(通常带有后退和前进按钮,例如Internet Explorer)。页面必须驻留在导航窗口或框架中
Windows只是普通的WPF应用程序Windows,但可以通过框架容器承载页面
推荐文章
- 实体框架核心:在上一个操作完成之前,在此上下文中开始的第二个操作
- 如何为构造函数定制Visual Studio的私有字段生成快捷方式?
- 如何使用JSON确保字符串是有效的JSON。网
- AppSettings从.config文件中获取值
- 通过HttpClient向REST API发布一个空体
- 如何检查IEnumerable是否为空或空?
- 自动化invokerrequired代码模式
- 没有ListBox。SelectionMode="None",是否有其他方法禁用列表框中的选择?
- 在c#代码中设置WPF文本框的背景颜色
- 在c#中,什么是单子?
- c#和Java中的泛型有什么不同?和模板在c++ ?
- c#线程安全快速(est)计数器
- 如何将此foreach代码转换为Parallel.ForEach?
- 如何分裂()一个分隔字符串到一个列表<字符串>
- 如何转换列表<字符串>列表<int>?