Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
370
Catch MouseDoubleClick in XamTreeGrid TemplateField
posted

I have XamTreeGrid with several template fields. I need to bind LeftDoubleClick to several of them with unique commands bound to each. So I have one general data template for the display of my values and then specific data template to handle each of the LeftDoubleClicks like this:

<DataTemplate x:Key="SpecificValueTemplate" DataType="local:MyDataItem">
<ContentControl ContentTemplate="{StaticResource GeneralValueTemplate}" Content="{Binding SpecificValue}">
<ContentControl.InputBindings>
<MouseBinding Gesture="LeftDoubleClick"
Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wpf:View}, Path=DataContext.SpecificValueLeftDoubleClickCommand}"
CommandParameter="{Binding}" />
</ContentControl.InputBindings>
</ContentControl>
</DataTemplate>

My problem is that I have to double click my value twice before the command is executed. Am I missing something? My CellClickAction is set to "SelectRecord" and the first double click is selecting and de-selecting the row. The second double click is doing the same + executing the command. I want the command to be executed on the first double click.

Parents Reply Children
No Data