예제 #1
0
        public static void UpdateTitle(this MauiComboBox nativeComboBox, IPicker picker)
        {
            nativeComboBox.Header = null;

            nativeComboBox.HeaderTemplate = string.IsNullOrEmpty(picker.Title) ? null :
                                            (UI.Xaml.DataTemplate)UI.Xaml.Application.Current.Resources["ComboBoxHeader"];

            nativeComboBox.DataContext = picker;
        }
예제 #2
0
        public static void UpdateTextColor(this MauiComboBox nativeComboBox, IPicker picker, WBrush?defaultForeground)
        {
            Color color = picker.TextColor;

            if (color.IsDefault() && defaultForeground == null)
            {
                return;
            }

            nativeComboBox.Foreground = color.IsDefault() ? (defaultForeground ?? color.ToNative()) : color.ToNative();
        }
예제 #3
0
 public static void UpdateFont(this MauiComboBox nativeComboBox, IPicker picker, IFontManager fontManager) =>
 nativeComboBox.UpdateFont(picker.Font, fontManager);
예제 #4
0
 public static void UpdateCharacterSpacing(this MauiComboBox nativeComboBox, IPicker picker)
 {
     nativeComboBox.CharacterSpacing = picker.CharacterSpacing.ToEm();
 }
예제 #5
0
 public static void UpdateSelectedIndex(this MauiComboBox nativeComboBox, IPicker picker)
 {
     nativeComboBox.SelectedIndex = picker.SelectedIndex;
 }
예제 #6
0
 public static void UpdateTextColor(this MauiComboBox nativeComboBox, IPicker picker)
 {
     nativeComboBox.UpdateTextColor(picker, null);
 }
예제 #7
0
 public static void UpdateHorizontalTextAlignment(this MauiComboBox nativeComboBox, IPicker picker)
 {
     nativeComboBox.HorizontalContentAlignment = picker.HorizontalTextAlignment.ToNativeHorizontalAlignment();
 }