Exemplo n.º 1
0
 void _icon_MouseClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if (e.ChangedButton == MouseButton.Left && LeftClickCommand != null && LeftClickCommand.CanExecute(sender))
     {
         LeftClickCommand.Execute(sender);
     }
     else if (e.ChangedButton == MouseButton.Right && RightClickCommand != null && RightClickCommand.CanExecute(sender))
     {
         RightClickCommand.Execute(sender);
     }
 }
Exemplo n.º 2
0
 private void UIElement_OnMouseRightButtonUp(object sender, MouseButtonEventArgs e)
 {
     RightClickCommand?.Execute(null);
 }
 async private void _control_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
 {
     await RightClickCommand.Execute();
 }