How to handle WPF Datagrid with double click without using code

We use Views and ViewModels in this project, and as a result we try to have as little code for the presentation as possible.

I am trying to bind the MouseDoubleClick event for a WPFToolkit DataGrid with the same code as the Button in the same view is already in use.

Button declared as follows:

 <Button Content="Select" cmd:ButtonBaseExtensions.Command="{Binding CommandViewEmployer}"/> 

which means that it runs the CommandViewEmployer property in the ViewModel. How to get Grid MouseDoubleClick to run the same property? I tried to add MouseDoubleClick="{Binding CommandViewEmployer}" , which errors.

I am trying to do this with as little code as possible, and not desirable.

+4
source share
1 answer

You can use something like Marlon Grech attached team behavior .

+2
source

All Articles