private void HookupExecuteEventForTextBox(CommandSubscription subscription) { var textBox = subscription.UIElement as TextBox; textBox.TextChanged += (s, e) => subscription.Execute(); }
private void HookupExecuteEventForButtonBase(CommandSubscription subscription) { var button = subscription.UIElement as ButtonBase; button.Click += (s,e) => subscription.Execute(); }
private void HookupExecuteEventForRoutedCommand(CommandSubscription subscription) { var routedCommand = subscription.UIElement as ICanExecuteCommand; routedCommand.Command += (s, e) => subscription.Execute(); }
private void HookupExceuteEventForLeftMouseButtonUp(CommandSubscription subscription) { subscription.UIElement.MouseLeftButtonDown += (s, e) => subscription.Execute(); }