Caliburn Micro 和 NavigationPane
对于我的 wpf 项目,我使用 caliburn micro 和 NavigationPane。 我的问题是如何实现导体功能。这是通过单击 NavigationPaneItem 更改当前屏幕的最佳方法。
for my wpf project I am using caliburn micro and NavigationPane.
My question is how can I emplement conductor functionality. That the best way to change current screen by cliking on NavigationPaneItem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您的屏幕管理器视图模型继承了 CaliburnM 的
Conductor
基础。因此,在您的 NavigationPane 的项目点击中,您可以调用 CaliburnM 的
ChangeActiveItem()
方法来交换屏幕。您必须将新的屏幕视图模型以及确定先前活动屏幕关闭的布尔值传递给该方法。PS:我不知道 NavigationPane 功能,但我对 CaliburnM 非常熟悉。
I am assuming that you have your Screen manager view model implemented inheriting the CaliburnM's
Conductor<T>
base.So in your NavigationPane's item click, you can call CaliburnM's
ChangeActiveItem()
method to swap the screens. You have to pass in the new screen view model to that method along with a boolean which determines the closure of the previously active screen.PS: I am not aware of NavigationPane functionality but I am pretty much familiar with CaliburnM.