<listbox><br> ....
<listbox.itemcontainerstyle><br> <style targettype="{x:Type ListBoxItem}" basedon="{StaticResource {x:Type ListBoxItem}}"><br /> <EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick"/><br /> </style>
</listbox.itemcontainerstyle>
</listbox>ListBoxItem_MouseDoubleClick is a method in your code behind with the correct signature forMouseDoubleClick.
Showing posts with label WPF. Show all posts
Showing posts with label WPF. Show all posts
Monday, July 12, 2010
WPF: Detect when someone double-clicks a listbox item
You can add a style to ListBox.ItemContainerStyle, and add an EventSetter there:
Subscribe to:
Posts (Atom)