WPF c#中的MDI父表单 [英] MDI Parent Forms in WPF c#

查看:93
本文介绍了WPF c#中的MDI父表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好如何将MDI父窗口添加到我的项目中

Hi How to add MDI Parent window to my project

推荐答案

感谢善良:勇敢的Microsoft试图劝阻错误引入的MDI模型,如果这种情况不好,则会被完全缺席WPF中的功能.但是,CodeProject的查询者不会停止要求这种有效的方法来陷入麻烦并吓scar用户,我不知道为什么.感谢WPF,我不必解释MDI有什么问题.甩掉包袱.

相反,对于最简单的解决方案,请使用TabControl.您想要成为MDI子级的对象将是此控件上的页面.易于实现,易于使用,简单而优雅.

另请参见:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages [如何在WPF中创建MDI父窗口? [ ^ ].

并且,以防万一,我过去的一些答案:
在WPF中使用MDI窗口的问题 [ ^ ],
MDIContainer提供错误 [
Thanks goodness: brave Microsoft attempts to discourage its mistakenly introduced MDI model crowned by complete absence if this bad feature in WPF. Nevertheless, CodeProject enquirers don''t stop asking for this effective method of getting into extra trouble and scarring off their users, I have no idea why. Thanks to WPF, I don''t have to explain what''s wrong with MDI. Good riddance.

Instead, for the simplest solution, use TabControl. What you wanted to make a MDI child will be a page on this control. Easy to implement, easy to use, simple and elegant.

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

And, just in case, some of my past answers:
Question on using MDI windows in WPF[^],
MDIContainer giving error[^].

Good luck,
—SA


嗨 一种方法是将Windows窗体托管到wpf.
其他是您可以将wpf表单转换为用户控件,并动态地将它们添加到选项卡控件中.
hi one way is to host your windows form to wpf.
Other is you can convert your wpf forms to user control and add and remove them from tab control dynamically.


这篇关于WPF c#中的MDI父表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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