Turker
Turker

Reputation: 27

WPF Listview Selection ClickMode

I was wondering if an item in ListView could be selected when Mouse Release, not Mouse Down. (Like ClickMode property of Buttons) Is there any way to achieve that?

Thanks!

Upvotes: 0

Views: 356

Answers (1)

HCL
HCL

Reputation: 36785

Register to PreviewMouseDown on the list and set e.Handled=true. Register to PreviewMouseUp and handle the selection manually. This should do what you're looking for.

But beware that such a list-behaviour confuses the user.

Upvotes: 1

Related Questions