public bool TouchUpInside(SKRect rect) { bool touchUpInsideButton = Touched && ViewBox.IntersectsWithInclusive(rect) && IsVisible; if (IsToggleButton && touchUpInsideButton) { IsToggled = !IsToggled; } return(touchUpInsideButton); }
public bool TouchUpInside(SKRect rect) { bool touchUpInsideButton = Touched && ViewBox.IntersectsWithInclusive(rect) && IsVisible; if (IsToggleButton && touchUpInsideButton) { IsToggled = !IsToggled; } if (touchUpInsideButton) { Handler?.Invoke(this, new EventArgs()); } return(touchUpInsideButton); }
public void CheckIntersection(SKRect rect) { Touched = ViewBox.IntersectsWithInclusive(rect); }