Beispiel #1
0
        private void InitMouseEvents()
        {
            _circle.MouseEnter           += (s, e) => MouseEnter?.Invoke(this, e);
            _circle.MouseLeave           += (s, e) => MouseLeave?.Invoke(this, e);
            _circle.MouseLeftButtonDown  += (s, e) => MouseLeftButtonDown?.Invoke(this, e);
            _circle.MouseLeftButtonUp    += (s, e) => MouseLeftButtonUp?.Invoke(this, e);
            _circle.MouseRightButtonDown += (s, e) => MouseRightButtonDown?.Invoke(this, e);
            _circle.MouseRightButtonUp   += (s, e) => MouseRightButtonUp?.Invoke(this, e);
            _circle.MouseMove            += (s, e) => MouseMove?.Invoke(this, e);

            _label.UILabel.MouseEnter           += (s, e) => MouseEnter?.Invoke(this, e);
            _label.UILabel.MouseLeave           += (s, e) => MouseLeave?.Invoke(this, e);
            _label.UILabel.MouseLeftButtonDown  += (s, e) => MouseLeftButtonDown?.Invoke(this, e);
            _label.UILabel.MouseLeftButtonUp    += (s, e) => MouseLeftButtonUp?.Invoke(this, e);
            _label.UILabel.MouseRightButtonDown += (s, e) => MouseRightButtonDown?.Invoke(this, e);
            _label.UILabel.MouseRightButtonUp   += (s, e) => MouseRightButtonUp?.Invoke(this, e);
            _label.UILabel.MouseMove            += (s, e) => MouseMove?.Invoke(this, e);
        }
 protected void OnMouseRightButtonDown(MouseButtonEventArgs e)
 {
     MouseRightButtonDown?.Invoke(this, e.ToMouseButtonEventArgsInt(MouseButton.Right, MouseButtonState.Pressed));
 }