I am using style to define the template of a predefined control. The control is part of a Framework which I cannot modify. This control has a DataGrid and for that I want to add a MouseDoubleClick event. The event handler (HandleGridDoubleClick) is already specified in the framework.
Is there a way to bind to this method ? I understand it would have been easy if the Framework provided a Command for that.
<Style
TargetType="xyz:FileMessageControl">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="xyz:FileMessageControl">
<Grid>
.....
<DataGrid MouseDoubleClick = HandleGridDoubleClick>
.....
</DataGrid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Try something like this (you need to use Interaction dll)