如何在wpf中制作mdi表单? [英] how to make mdi form in the wpf?

查看:80
本文介绍了如何在wpf中制作mdi表单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在wpf中创建mdi表单?给出一些示例?如何运行mdi父代替widow.xaml?

解决方案

WPF利用导航 [ ^ ]。这是与基于表单的mdi控件不同的方法。



如果您仍然不想使用导航,请在对接控件上查看此视频 - http://www.youtube.com/watch?v=bLSvB9rbHO0 [ ^ ]。






首先,你不能在WPF中进行MDI。



第二件事,WPF中有很多新方法,也更有趣。您必须已经看到所有Internet浏览器使用Tab方法。这些天很受欢迎。



您可以看到以下链接开始。



在WPF中获取MDI [ ^ ]





RKS


不是说做这样的事情是完全不可能的。更重要的是要理解为什么WPF中没有MDI功能。



真正的原因是WPF是微软逐步淘汰困扰功能的可接受借口UI开发多年。微软只是努力删除这种风格,但备份兼容性的要求阻止了它。他们甚至没有设法从 System.Windows.Forms 中排除它。可能他们害怕它会导致基于本机Windows API通过P / Invoke隐藏此功能。我只是推测。



与此同时,你有没有看到甚至不是很好的用户界面,而只是基于MDI的最低专业用户界面?我不。十多年前,这种风格从最低质量的软件中消失了。你也不想要它。你试过使用这样的IU吗?这是非常不方便的。



最接近的MDI,可能是 TabControl 。它实现起来非常简单,但非常方便。对于更高级的行为,您可以使用动态对接,就像在Visual Studio中一样。以下是实施它的项目: [ ^ ]。



AvalonDock引用的是非常强大的软件使用,特别是在SharpDevelop中,开源.NET API:

http://en.wikipedia.org/wiki/SharpDevelop [ ^ ],

http://www.icsharpcode.net/OpenSource/SD/Default.aspx [ ^ ]。



另见:

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

如何在WPF中创建MDI父窗口? [ ^ ]。



我还在过去的答案中解释了要做什么:

如何在WPF中创建MDI父窗口? [ Solution 2 ],

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

MDIContainer给出错误 [ ^ ],

如何设置最大化的子表单,最小化最后一个子表单 [ ^ ]。



-SA

how to make mdi form in the wpf?give some example ?how to run the mdi parent instead of widow.xaml?

解决方案

WPF makes use of navigation[^]. This is a different approach from form-based mdi controls.

If you still don't want to use navigation, have a look at this video on the docking control - http://www.youtube.com/watch?v=bLSvB9rbHO0[^].


Hi,

First thing, You can't do the MDI in WPF.

Second thing, there are lots of new approach in WPF and more interesting also. You must have seen all Internet Browser uses Tab approach. And these days it is well appreciated.

You can see the following link for start.

Tabbed MDI in WPF[^]


RKS


Not that doing such thing is totally impossible. It's more important to understand why MDI feature is not available in WPF.

The real reason is that WPF served as a acceptable excuse for Microsoft to phase out the feature which haunted UI development for years. Microsoft simply tried hard to remove this style, but the requirements of backup compatibility prevented it. They even did not managed to exclude it from System.Windows.Forms. Probably, they were afraid that it will result in sneaking this feature in Forms based on native Windows API through P/Invoke. I just speculate.

At the same time, did you ever see not even good UI, but simply minimally professional UI based on MDI? I don't. This style disappeared from the software of minimal quality more than decade ago. You don't want it, too. Did you try to use such IU? It's utterly inconvenient.

The nearest equivalent of MDI is, maybe TabControl. It is very simple in implementation and yet pretty convenient. For more advanced behavior, you can use dynamic docking, like in Visual Studio. Here is the project which implements it: .[^].

AvalonDock referenced about is pretty robust software use, in particular, in SharpDevelop, open-source .NET API:
http://en.wikipedia.org/wiki/SharpDevelop[^],
http://www.icsharpcode.net/OpenSource/SD/Default.aspx[^].

See also:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
How to Create MDI Parent Window in WPF?[^].

I also explained what to do instead in my past answers:
How to Create MDI Parent Window in WPF? [Solution 2],
Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to set child forms maximized, last childform minimized[^].

—SA


这篇关于如何在wpf中制作mdi表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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