Caliburn Micro 和 NavigationPane

发布于 2024-12-23 08:40:44 字数 174 浏览 2 评论 0原文

对于我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半步萧音过轻尘 2024-12-30 08:40:44

我假设您的屏幕管理器视图模型继承了 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文