I have the following DataGrid:
<DataGrid SelectedItem="{Binding CurrentX}" ColumnWidth="*" ItemsSource="{Binding Model.Xlist, Mode=TwoWay}" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTemplateColumn Width="Auto" Header="GO">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Image Width="30" Height="30" Source="../Resources/xx.ico" MouseDown="Image_MouseDown">
</Image>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
When I click on a row the click occurs before binding to SelectedItem, I want it to be in the opposite way(first the binding and then the event of the click),
it is possible to do this?
I had similar problem. Use
MouseUpevent: