public virtual void MouseOut(MouseEventArgs e) { if (Enabled && Hovered) { if (!EffectiveBounds.Contains(e.Position)) { Hovered = false; OnMouseOut?.Invoke(this, EventArgs.Empty); } } }
public virtual void MouseOver(MouseEventArgs e) { if (Enabled && !Hovered) { if (EffectiveBounds.Contains(e.Position)) { Hovered = true; OnMouseOver?.Invoke(this, EventArgs.Empty); } } }