shell caliburn micro 或其他 MVVM 框架中的更多活动屏幕/视图
如果我使用 caliburn micro,是否可以在一个 shell 中拥有更多活动屏幕/视图?
像这样的 shell 视图代码 - wpf 窗口:
<ContentControl x:Name="ActiveItem_1" Grid.Row=1/>
<ContentControl x:Name="ActiveItem_2" Grid.Row=2/>
<ContentControl x:Name="ActiveItem_9" Grid.Row=9/>
谢谢您的建议,或者在哪个 MVVM 中这可能?
It is possible have more active screen / view in one shell if I am using caliburn micro ?
Something like this, code for shell view - wpf window:
<ContentControl x:Name="ActiveItem_1" Grid.Row=1/>
<ContentControl x:Name="ActiveItem_2" Grid.Row=2/>
<ContentControl x:Name="ActiveItem_9" Grid.Row=9/>
Thank you for advice, or in which MVVM this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于 AllActive 导体,您将在 ShellViewModel 中继承
Items
集合。当调用ActivateItem(vm)
时,视图模型将被添加到Items
集合中,而当调用DeactivateItem(vm, close: true)
时,视图模型将被删除。然后,在 ShellView.xaml 中,您可以将Items
(视图模型的集合)绑定到ItemsControl
。MyView.xaml
MyViewModel.cs
ShellView.xaml
ShellViewModel.cs
In case of AllActive conductor you will have inherited
Items
collection in your ShellViewModel. When callingActivateItem(vm)
View Model will be added intoItems
collection and when callingDeactivateItem(vm, close: true)
- removed. Then in ShellView.xaml you can bindItems
(collection of View Models) toItemsControl
.MyView.xaml
MyViewModel.cs
ShellView.xaml
ShellViewModel.cs
是的。这可以通过...
参见屏幕、导体和组合文档页面。
我相当确定 Caliburn.Micro 会照顾其余的事情,但我目前无法进行测试。
Yes. This is possible with...
See Screens, Conductors and Composition doc page.
I am fairly sure that Caliburn.Micro will look after the rest but I am unable to test at the moment.