是否CompositeWPF支持多窗口/壳? [英] Does CompositeWPF support multiple windows/shells?

查看:176
本文介绍了是否CompositeWPF支持多窗口/壳?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看用CompositeWPF( HTTP://www.$c$cplex.com/ CompositeWPF ) - 又名棱镜,打造我的工作的应用程序

I'm looking at using CompositeWPF (http://www.codeplex.com/CompositeWPF) - aka Prism, to build an application I am working on.

该应用程序是不是一个传统的LOB应用程序,但它确实present数据和状态信息给用户。

The application isn't a traditional LOB application, however it does present data and state information to the user.

有一件事我不能确定的是,如果CompositeWPF支持多个窗口或shell。我想有我的应用程序出现在较低的RHS屏幕的边框无窗通知用户(个人认为MSN通知),但仍使用的意见想法被注入到区域等。

One thing which I am unsure of is if CompositeWPF supports more than one Window or Shell. I would like to have my application notify users with a border-less window which appears in the lower RHS of the screen (think MSN notification) but still use the idea of views being injected into the region etc.

在除了这个我想是能够反应用户操作(如双击某事),隐藏在主窗口和present进度对话框时正在执行的工作。

In addition to this I would like to be able to react to a user action (e.g. double click on something), hide the main window and present a progress dialog while work is being performed.

那么,这可能吗?

推荐答案

我一直在使用复合WPF了几个月,并看不出有什么理由你应该是无法做到你问的事情。

I have been using Composite wpf for a couple of months and see no reason why you should be unable to do the things you ask.

我可能不会去多壳的路线,有一个复合WPF的contrib项目定义了WindowRegionAdaptor这是应该可以很容易地表明观点的单独窗口(在这里看到:的 HTTP://www.$c$cplex.com/CompositeWPFContrib )我还没有使用它,但也使用了一些其他的contrib项目和他们的工作作为标榜。虽然文档目前缺乏对其中一些不存在的论坛可能是有用的。

I would probably not go the multiple shell route, there is a 'Composite wpf contrib project' which defines a 'WindowRegionAdaptor' which is supposed to make it easy to show views in seperate windows (See here: http://www.codeplex.com/CompositeWPFContrib ) I have not used it but have used some of the other contrib items and they work as advertised. Though the documentation is currently scant to non-existent on some of them the forums can be useful.

我会尝试,但你可以使用事件聚合在你双击动作发布事件

I would have to try it out but you could use the event aggregator to publish an event on your double click action

eventAggregator.GetEvent<MainWindowShowEvent>().Publish(false);

其中壳牌presenter可以订阅,并呼吁在外壳观点隐藏在收到:

which the ShellPresenter could subscribe to and call on to the shell view to hide on receipt:

eventAggregator.GetEvent<MainWindowShowEvent>().Subscribe(b => View.Show(b) );

然后使用WindowRegionAdaptor来显示你的进度对话框,随后在完成发布第二个事件是主窗口赞同这会导致它再次显示。(以上我所用的有效载荷,而不是指示外壳是否应显示或隐藏)

then use the WindowRegionAdaptor to display your progress dialog and subsequently on completion publish a second event that the main window subscribes to which causes it to show again.. (above I used the payload instead to indicate whether the shell should show or hide)

希望一些帮助 - 所有未测试

hope some of that helps - all untested

崔佛

这篇关于是否CompositeWPF支持多窗口/壳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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