Advertisement
Guest User

Untitled

a guest
May 4th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. ZoomCommand = new RoutedCommand( "ZoomCommand", typeof( MyCustomControl) );
  2. this.CommandBindings.Add( new CommandBinding( ZoomCommand, zoomCommandHandler,
  3. ( s, e ) => e.CanExecute = this.IsZoomEnabled ) );
  4.  
  5. <KeyBinding Key="Add" CommandTarget="{Binding ElementName=myCustomControl}"
  6. Command="{Binding ElementName=myCustomControl, Path=ZoomCommand}" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement