WPF MDI 子级 [英] WPF MDI children

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

问题描述

这个问题以前有人发过,但我找不到好的答案.

我希望在我的 WPF 应用程序中使用 MDI 子项.我希望这些孩子完全符合 WPF.

.Net WPF 不再有 MDI 子项(主窗口中的窗口).有人说这是因为设计已经过时,GUI 应用程序不应该这样设计.那些人可以不回答这个帖子.我知道我需要什么.:)

WPF MDI 有哪些(最好是免费的)替代方案?它们会与 MVVM 一起使用吗?

人们 - 不要对说MDI 不好"的评论投反对票.我特别要求人们避免这种情况.我要求使用 MDI 窗口,而不是被告知不要使用 MDI 窗口.

解决方案

我知道你不想听到这个,但是 MDI 基本上旨在复制应用程序主窗口内的桌面比喻,这对最终用户来说有点混乱,因为它涉及多个级别的窗口管理:

<块引用>

技术:现在点击另一个窗口内活动窗口的最大化按钮你刚刚恢复到正常大小,一切都应该没问题.

客户:什么?

基于标签的界面通常被认为是 MDI 的更好替代品.您可能想要使用 TabControl 类并阅读 Josh Smith 在 MSDN 杂志上的 MVVM 文章,其中演示了如何在 TabItems 中托管您的视图.>

This question has been posted before, but I can't find a good answer.

I want MDI children in my WPF application. And I want those children to be fully WPF compliant.

.Net WPF doesn't have MDI children (windows within main window) any more. Some say it’s because the design is obsolete and GUI apps shouldn't be designed that way. Those people can refrain from answering this post. I know what I need. :)

What (preferably free) alternatives is there for WPF MDI? Will they work with MVVM?

EDIT: PEOPLE - don't vote up comments that say "MDI IS NOT GOOD". I specifically asked people to avoid that. I'm asking for MDI windows, not to be told not to use MDI windows.

解决方案

I understand you don't want to hear that, but MDI basically aimed to duplicate the desktop metaphor inside the application's main window, and that was a little confusing to end users because it involved several levels of window management:

Tech: Now click on the Maximize button of the active window inside the other window you've just restored to normal size and everything should be okay.

Customer: What?

Tab-based interfaces are generally considered as a better alternative to MDI. You might want to use the TabControl class and read Josh Smith's MVVM article on MSDN Magazine, which demonstrates how to host your views in TabItems.

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

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