Пример #1
0
        public bool TouchUpInside(SKRect rect)
        {
            bool touchUpInsideButton = Touched && ViewBox.IntersectsWithInclusive(rect) && IsVisible;

            if (IsToggleButton && touchUpInsideButton)
            {
                IsToggled = !IsToggled;
            }

            return(touchUpInsideButton);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public void CheckIntersection(SKRect rect)
 {
     Touched = ViewBox.IntersectsWithInclusive(rect);
 }