Пример #1
0
 private void HookupExecuteEventForTextBox(CommandSubscription subscription)
 {
     var textBox = subscription.UIElement as TextBox;
     textBox.TextChanged += (s, e) => subscription.Execute();
 }
Пример #2
0
 private void HookupExecuteEventForButtonBase(CommandSubscription subscription)
 {
     var button = subscription.UIElement as ButtonBase;
     button.Click += (s,e) => subscription.Execute();
 }
Пример #3
0
 private void HookupExecuteEventForRoutedCommand(CommandSubscription subscription)
 {
     var routedCommand = subscription.UIElement as ICanExecuteCommand;
     routedCommand.Command += (s, e) => subscription.Execute();
 }
Пример #4
0
 private void HookupExceuteEventForLeftMouseButtonUp(CommandSubscription subscription)
 {
     subscription.UIElement.MouseLeftButtonDown += (s, e) => subscription.Execute();
 }