public static void SetColorFilter(this ADrawable drawable, Maui.Color color, FilterMode mode) { if (drawable == null) { return; } drawable.SetColorFilter(color.ToNative(), mode); }
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(); }
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());