How to bind a command in WPF to a double click event handler of a control?
I need to bind the double click event of a textblock (or potentially an image as well - either way, its a user control), to a command in my ViewModel. TextBlock.InputBindings does not seem to bind correctly to my commands, any help? Kent Boogaart Try Marlon Grech's attached command behaviors . <Button> <Button.InputBindings> <MouseBinding Gesture="LeftDoubleClick" Command="YourCommand" /> </Button.InputBindings> </Button> http://thejoyofcode.com/Invoking_a_Command_on_a_Double_Click_or_other_Mouse_Gesture.aspx Adam it's simple let's use the MVVM way: I'm using here MVVM Light which is easy to