peterh
Topic Author
Posts: 34
Joined: 13 Mar 2015, 13:50

Preventing user selecting items in a ListView

16 Mar 2021, 21:16

In WPF, the SelectionMode property of ListView has a possible value of "None" to prevent a user from selecting items in the ListView. This value seems to be missing in the Noesis.SelectionMode enum. Is there a workaround for this?
 
peterh
Topic Author
Posts: 34
Joined: 13 Mar 2015, 13:50

Re: Preventing user selecting items in a ListView

16 Mar 2021, 21:25

Turns out the None value is a UWP thing, but the question how to work around there not being one still stands.
 
User avatar
sfernandez
Site Admin
Posts: 2346
Joined: 22 Dec 2011, 19:20

Re: Preventing user selecting items in a ListView

17 Mar 2021, 20:27

Could be an option to disable the ListViewItems? You can do that in the ItemContainerStyle for the ListView.
If not you can always handle the PreviewMouseDown in the ListView to avoid the selection.

Please let me know if that works for you.

Who is online

Users browsing this forum: No registered users and 1 guest