且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WPF绑定到IsSelected视图模型不设置那些不在列表中被证明项目

更新时间:2023-10-08 23:39:46

的MVVM方式做,这将是覆盖按Ctrl-A快捷键与自己的选命令(用Ctrl-A的快捷方式创建一个SellectAll命令) 。实施将设置视图模型IsSelected。

The MVVM way to do this would be to override the Ctrl-A shortcut with your own SelectAll command (Create a SellectAll command with a shortcut of Ctrl-A). The implementation will set IsSelected on the view models.

在你看来你的IsSelected属性需要有一个双向绑定到您的视图模式,使项目出现在视图中选择。

Your IsSelected property in your view needs to have a two way binding to your view model so that the items appear selected in your view.

我不认为关闭虚拟化是所必要的。

I dont think turning off virtualisation is nessesary.

希望这有助于。