public override void OnMouseUp(MouseEventArgs e) { if (Enabled && Pressed) { if (InteractiveBounds.Contains(e.Position)) { Pressed = false; if (IsChecked) { IsChecked = false; UpdateStyle(); Unchecked?.Invoke(this, EventArgs.Empty); return; } if (!IsChecked) { IsChecked = true; UpdateStyle(); Checked?.Invoke(this, EventArgs.Empty); return; } } } }
public virtual void OnMouseUp(MouseEventArgs e) { if (Enabled && Pressed) { if (InteractiveBounds.Contains(e.Position)) { Pressed = false; UpdateStyle(); Clicked?.Invoke(this, EventArgs.Empty); } } }
//public abstract ControlState GetState(); #endregion #region [ Mouse Down/Up ] public virtual void OnMouseDown(MouseEventArgs e) { if (Enabled && !Pressed) { if (InteractiveBounds.Contains(e.Position)) { Pressed = true; UpdateStyle(); MouseDown?.Invoke(this, EventArgs.Empty); } } }