Code Sample:
<DataTemplate x:Key="NodeDataTemplate">
<Border Style="{StaticResource nodeBorderStyle}"
MouseEnter="SetMouseCursor_Arrow"
MouseLeave="SetMouseCursor_ScrollAll"
MouseLeftButtonDown="ViewLink"
MouseLeftButtonDown="SetFlagForCursorTracking">
....
</DataTemplate>
I want to add 2 handlers to a particular event like shown above. However this won’t compile – ‘attribute can be set more than once’. I have multiple methods because they do different things (are named appropriately). e.g. the first handler has nothing in common with the second.
My other option was to kludge a SetFlagForCursorTrackingAndCheckForViewLink method – which is “Yech!”.
Any ideas ?
Please try to just add one handler which will subsequently call some event handling method. Or add just one handler which will subsequently call your desired two event handling methods – this will be more elegant.