如何在WPF中创建MDI父窗口? [英] How to Create MDI Parent Window in WPF?

查看:73
本文介绍了如何在WPF中创建MDI父窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在窗口应用程序中有一个MDI父窗体..但是在WPF的情况下没有父窗口。在一些网站中,他们在WPF中创建父窗口但是他们正在使用用户控件。是否有可能在不使用用户控件的情况下在WPF中创建父窗口..

In Window Application There is a MDI Parent Form.. But in case of WPF there is no Parent window. In some websites they create parent window in WPF But they are using User Control. Is there is any possible for create a Parent Window in WPF without using User Control..

推荐答案

华友世纪! WPF不支持MDI。最后微软决定把垃圾丢弃。



见:

http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages [ ^ ]。



另见我过去的答案:

在WPF中使用MDI窗口的问题 [ ^ ],

MDIContainer给出错误 [ ^ ]。



这不是MDI而是该文章的作者刚才称它为MDI。事实上,这不是MDI,而是更好的方法: WPF中的选项卡式MDI [ ^ ]。



-SA
Hurray! WPF does not support MDI. Finally Microsoft decided to trash this garbage.

See:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^].

See also my past answers:
Question on using MDI windows in WPF[^],
MDIContainer giving error[^].

This is not MDI but the author of the article just called it MDI. In fact, this is not MDI but something much better: Tabbed MDI in WPF[^].

—SA


WPF没有MDI应用程序的概念。事实上,微软正试图阻止任何使用这种形式的应用程序。您最好使用TabControl创建选项卡式文档界面应用程序,并将每个文档作为单独的选项卡打开。查看所有最近的应用程序,例如Internet Explorer,Firefox Microsoft Office应用程序等,您将看到它们都使用选项卡向用户显示多个文档。虽然我说你可以使用单独的窗口滚动你自己的MDI版本,但我真的不鼓励这样做。
WPF has no concept of MDI applications. In fact Microsoft is trying to discourage any one using that form of application. You are much better off creating a Tabbed Document Interface application using the TabControl, and opening each document as a separate tab. Take a look at all recent applications, such as Internet Explorer, Firefox Microsoft Office applications etc, and you will see that they all use tabs to present multiple documents to the User. Having said that you can of course roll your own version of MDI using separate windows, although I really discourage this.


这篇关于如何在WPF中创建MDI父窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆