在 WPF 中创建 MDI 弹出窗口的最佳方法是什么?
我需要创建一个原型来测试 WPF 执行以下操作的能力:
- 一个基本窗口作为该窗口中应用程序的基础,
- 用户可以单击(例如“添加客户”),然后弹出一个新窗口
- 弹出窗口很亮
- 背景中的主窗口变暗
- 如果用户单击主窗口,则
- 主窗口变亮
- 弹出窗口变暗并进入背景
- 一个窗口中的任何更改我们需要立即在所有窗口中生效,无论亮还是变暗
问题:
- 子窗口是否应该是用户控件还是窗口?
- 有没有什么类型的“MDI框架”我可以利用,
- 有什么特别的我必须考虑以确保所有窗口不断更新,例如使用ObservableCollections等?
- 我应该将所有全局变量作为属性存储在主窗口中,以便子窗口可以访问它们吗?
- 在 WPF 中如何“调暗窗口”或“模糊窗口”?
欢迎任何建议。
I need to create a prototype to test the ability of WPF to do the following:
- one base window as the application's base
- within this window user can click (e.g. on "add customer") and a new window pops up
- the pop-up window is bright
- the main window in the background is dimmed
- if the user clicks on the main window
- main window becomes bright
- pop-up window is dimmed and goes into the background
- any changes in one window we need to take immediate effect in all windows, bright or dimmed
Questions:
- should the child windows be user controls or windows?
- is there any kind of "MDI framework" I can take advantage of
- is there anything special I have to consider to make sure all windows are constantly updated, e.g. use ObservableCollections, etc.?
- should I store all global variables as properties in the main window so that the child windows can access them?
- how would you go about "dimming a window" or "blurring a window" in WPF?
Any advice welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://blogs.msdn.com/ivo_manolov/archive/ 2009/05/03/9584900.aspx
代码:
当您想要调暗窗口时,将dimElement上的Visibility设置为“Visible”并将其设置为根据需要“折叠”至不暗淡。
希望有帮助!
http://blogs.msdn.com/ivo_manolov/archive/2009/05/03/9584900.aspx
code:
When you want to dim a window set Visibility on dimElement to "Visible" and set it to "Collapsed" to un-dim as appropriate.
Hope that helps!