如何在选项卡中打开子窗口 [英] How to Open Child Window in tab

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

问题描述

大家好,

实际上,我想以选项卡"形式打开MDI子窗口:Mozilla或Internet Explorer.

所以请建议我该怎么做?

感谢

Hello Everybody,

Actually i want to open MDI Child Window in Tab Form Like : Mozilla Or Internet Explorer.

So pls suggest me how to do this?

Thanks

推荐答案

此处有一篇文章:带标签的MDI子表单 [^ ]
There is an article here: Tabbed MDI Child Forms[^]


除了经典MDI之外,在System.Windows.Forms和WPF中没有子窗口的概念.您没有使用它(这是一个完美的决定:MDI是Microsoft最糟糕的UI发明之一,包括Microsoft在内的任何人都强烈反对MDI,并且从未在或多或少可以接受的高质量应用程序中使用它.)

您正在尝试使用基于TabControl的UI,这非常好.在这种设计中,除了带有TabControl的主窗体外,没有其他窗口(可以,但可以与选项卡式界面无关,但不相关). TabControl的实例具有包含子控件的选项卡页(在System.Windows.Forms的情况下,它们可以是窗口控件,但从System.Windows.Forms或WPF的角度来看,它们不是窗口或窗体;在WPF中,子级可以是实例属于UIElement.

这是展示如何制作此类界面的文章之一:
在WPF中标记的MDI [
There is no concept of child window in System.Windows.Forms and not in WPF, except classical MDI. You''re not using it (and this is a perfect decision: MDI is one of the worst UI inventions by Microsoft, it is highly discouraged by anyone including Microsoft and never used in more or less acceptable quality applications).

You''re trying to use TabControl based UI, which is very good. In such design, there are no other windows except a main form with TabControl (well, they can be, but not related to your tabbed interface). An instance of TabControl has tab pages which contain children control (they can be windowed controls in case of System.Windows.Forms, but they are not windows or forms from the stand point of System.Windows.Forms or WPF; in WPF children can be instances of UIElement.

This is one of the articles showing how to make such interface:
Tabbed MDI in WPF[^]. Griff provided a link to the solution for Forms.
(Sorry, you did not tag your library, so I''ve chosen WPF; you can search CodeProject or Google for more samples.)

—SA


您可以使用链接

http://www.technologymaterial.com/Articles/WpfTabbedMDI.aspx?cat=wpf& aid = 1 [ ^ ]
you can use link

http://www.technologymaterial.com/Articles/WpfTabbedMDI.aspx?cat=wpf&aid=1[^]


这篇关于如何在选项卡中打开子窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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