Exemplo n.º 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;
        }
Exemplo n.º 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();
        }
Exemplo n.º 3
0
 public static void UpdateFont(this MauiComboBox nativeComboBox, IPicker picker, IFontManager fontManager) =>
 nativeComboBox.UpdateFont(picker.Font, fontManager);
Exemplo n.º 4
0
 public static void UpdateCharacterSpacing(this MauiComboBox nativeComboBox, IPicker picker)
 {
     nativeComboBox.CharacterSpacing = picker.CharacterSpacing.ToEm();
 }
Exemplo n.º 5
0
 public static void UpdateSelectedIndex(this MauiComboBox nativeComboBox, IPicker picker)
 {
     nativeComboBox.SelectedIndex = picker.SelectedIndex;
 }
Exemplo n.º 6
0
 public static void UpdateTextColor(this MauiComboBox nativeComboBox, IPicker picker)
 {
     nativeComboBox.UpdateTextColor(picker, null);
 }
Exemplo n.º 7
0
 public static void UpdateHorizontalTextAlignment(this MauiComboBox nativeComboBox, IPicker picker)
 {
     nativeComboBox.HorizontalContentAlignment = picker.HorizontalTextAlignment.ToNativeHorizontalAlignment();
 }