Beispiel #1
0
        private void UpdateCornerRadius()
        {
            if (_nativeView == null || _backgroundElement == null)
            {
                return;
            }

            switch (_nativeView)
            {
            case MaterialCardView mCardView:
                mCardView.SetCornerRadius(_context, _backgroundElement);
                break;

            case Chip mChip:
                mChip.SetCornerRadius(_context, _backgroundElement);
                break;

            case MaterialButton mButton:
                mButton.SetCornerRadius(_context, _backgroundElement);
                break;

            default:
                _nativeView.SetCornerRadius(_backgroundElement);
                InvalidateOutline();
                break;
            }
        }
Beispiel #2
0
 public static void SetCornerRadius(this AView view, Context context, VisualElement element, ICornerElement cornerElement, Color?color = null)
 {
     view.SetCornerRadius(context, element, cornerElement.CornerRadius, color);
 }
Beispiel #3
0
 public static void SetCornerRadius(this AView view, ICornerElement cornerElement)
 {
     view.SetCornerRadius(cornerElement.CornerRadius);
 }