开发者

How to limit selection to maximum two cells in a row of a DataGrid in WPF?

开发者 https://www.devze.com 2023-02-27 07:51 出处:网络
I am currently trying to limit selection of maximum two consecutive cells in a single row of a DataGrid in 开发者_如何学PythonWPF. How can I do that? Any hints? Thanks.Your best bet is to listen to Se

I am currently trying to limit selection of maximum two consecutive cells in a single row of a DataGrid in 开发者_如何学PythonWPF. How can I do that? Any hints? Thanks.


Your best bet is to listen to SelectionChanged and then manipulate the SelectedItems property manually.

0

精彩评论

暂无评论...
验证码 换一张
取 消