private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            if (!(e.Source is Button button))
            {
                return;
            }
            switch (button.Name)
            {
            case "LeftButton":
                LeftButtonClick?.Invoke(this, EventArgs.Empty);
                break;

            case "RightButton":
                RightButtonClick?.Invoke(this, EventArgs.Empty);
                break;
            }
        }
예제 #2
0
 private void btnRight_Click(object sender, RoutedEventArgs e)
 {
     RightButtonClick?.Invoke(this, EventArgs.Empty);
 }
예제 #3
0
 private void RightButton_Click(object sender, EventArgs e)
 {
     RightButtonClick?.Invoke(sender, e);
 }
 protected virtual void OnRightButtonClick(EventArgs e) => RightButtonClick?.Invoke(this, e);