Hi Is there any way to choose from where XAML should use command bindings event handlers? I added copule of command binding to my cusotm control, however functions which are resonsible for execute and can_execute are not directly in code behind but in another class. This class is derived from Canvas and I create instance of this class in XAML.
<s:MyCanvas Focusable="true" Background="Transparent" x:Name="OwnCanvas" FocusVisualStyle="{x:Null}" ScrollViewer.CanContentScroll="True" >
I add command bindings this way
<UserControl.CommandBindings>
<CommandBinding Command="{x:Static ApplicationCommands.Copy}" CanExecute="event handler from object OwnCanvas" />
</UserControl.CommandBindings>
Is there any way to do that ? Or I have to transfer event handler directly to codebehind ??