Beispiel #1
0
 public static void UpdateTextColor(this AppCompatButton button, XColor color, ColorStateList?defaultColor)
 {
     if (color.IsDefault)
     {
         button.SetTextColor(defaultColor);
     }
     else
     {
         button.SetTextColor(color.ToNative());
     }
 }
Beispiel #2
0
        public static void SetColorFilter(this ADrawable drawable, Color color, AColorFilter defaultColorFilter, FilterMode mode)
        {
            if (drawable == null)
            {
                return;
            }

            if (color == Color.Default)
            {
                SetColorFilter(drawable, defaultColorFilter);
                return;
            }

            drawable.SetColorFilter(color.ToAndroid(), mode);
        }
Beispiel #3
0
 public static Task <UIImage> AssertContainsColor(this UIView view, Microsoft.Maui.Color expectedColor) =>
 AssertContainsColor(view, expectedColor.ToNative());
Beispiel #4
0
 public static void SetColorFilter(this ADrawable drawable, Color color, FilterMode mode)
 {
     drawable.SetColorFilter(color.ToAndroid(), mode);
 }
Beispiel #5
0
 static XColor Cleanse(this XColor color, XColor defaultColor) => color.IsDefault ? defaultColor : color;
Beispiel #6
0
 public static void UpdateTextColor(this AppCompatButton appCompatButton, IButton button, XColor defaultColor) =>
 appCompatButton.SetTextColor(button.TextColor.Cleanse(defaultColor).ToNative());