Exemple #1
0
        public static void SetColorFilter(this ADrawable drawable, Maui.Color color, FilterMode mode)
        {
            if (drawable == null)
            {
                return;
            }

            drawable.SetColorFilter(color.ToNative(), mode);
        }
Exemple #2
0
        public static void UpdateThumbColor(this UISwitch uiSwitch, ISwitch view, UIColor?defaultThumbColor)
        {
            if (view == null)
            {
                return;
            }

            Maui.Color thumbColor = view.ThumbColor;
            uiSwitch.ThumbTintColor = thumbColor.IsDefault ? defaultThumbColor : thumbColor.ToNative();
        }
Exemple #3
0
        public static void SetColorFilter(this ADrawable drawable, Maui.Color color, FilterMode mode, AColorFilter?defaultColorFilter)
        {
            if (drawable == null)
            {
                return;
            }

            if (color == Maui.Color.Default)
            {
                SetColorFilter(drawable, defaultColorFilter);
            }
            else
            {
                drawable.SetColorFilter(color.ToNative(), mode);
            }
        }
 public static Bitmap AssertContainsColor(this AView view, Maui.Color expectedColor) =>
 AssertContainsColor(view, expectedColor.ToNative());