コード例 #1
0
 public static void UpdateForeground(this MauiCheckBox nativeCheckBox, ICheckBox check)
 {
     // For the moment, we're only supporting solid color Paint for the iOS Checkbox
     if (check.Foreground is SolidPaint solid)
     {
         nativeCheckBox.CheckBoxTintColor = solid.Color;
     }
 }
コード例 #2
0
        public static void UpdateForeground(this MauiCheckBox nativeCheckBox, ICheckBox check)
        {
            var tintBrush = check.Foreground?.ToNative();

            if (tintBrush == null)
            {
                nativeCheckBox.TintBrush = new SolidColorBrush(UI.Colors.Black);
                return;
            }

            nativeCheckBox.TintBrush = tintBrush;
        }
コード例 #3
0
 public static void UpdateIsChecked(this MauiCheckBox nativeCheckBox, ICheckBox check)
 {
     nativeCheckBox.IsChecked = check.IsChecked;
 }