public static void MapText(SearchBarHandler handler, ISearchBar searchBar)
        {
            handler.NativeView?.UpdateText(searchBar);

            // Any text update requires that we update any attributed string formatting
            MapFormatting(handler, searchBar);
        }
Exemplo n.º 2
0
        public static void MapFont(SearchBarHandler handler, ISearchBar searchBar)
        {
            _ = handler.Services ?? throw new InvalidOperationException($"{nameof(Services)} should have been set by base class.");

            var fontManager = handler.Services.GetRequiredService <IFontManager>();

            handler.QueryEditor?.UpdateFont(searchBar, fontManager);
        }
Exemplo n.º 3
0
        public static void MapFont(SearchBarHandler handler, ISearchBar searchBar)
        {
            var services = App.Current?.Services ??
                           throw new InvalidOperationException($"Unable to find service provider, the App.Current.Services was null.");
            var fontManager = services.GetRequiredService <IFontManager>();

            handler.QueryEditor?.UpdateFont(searchBar, fontManager);
        }
Exemplo n.º 4
0
        public static void MapFormatting(SearchBarHandler handler, ISearchBar searchBar)
        {
            // Update all of the attributed text formatting properties
            handler.QueryEditor?.UpdateCharacterSpacing(searchBar);

            // Setting any of those may have removed text alignment settings,
            // so we need to make sure those are applied, too
            handler.QueryEditor?.UpdateHorizontalTextAlignment(searchBar);
        }
 public static void MapTextColor(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.QueryEditor?.UpdateTextColor(searchBar, handler._defaultTextColor);
 }
Exemplo n.º 6
0
 public static void MapVerticalTextAlignment(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateVerticalTextAlignment(searchBar, handler._editText);
 }
 public static void MapHorizontalTextAlignment(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.QueryEditor?.UpdateHorizontalTextAlignment(searchBar);
 }
 public static void MapPlaceholder(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdatePlaceholder(searchBar);
 }
Exemplo n.º 9
0
 public static void MapCancelButtonColor(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateCancelButtonColor(searchBar, handler._cancelButton, handler._defaultDeleteButtonBackgroundColorBrush, handler._defaultDeleteButtonForegroundColorBrush);
 }
Exemplo n.º 10
0
 public static void MapTextColor(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateTextColor(searchBar, handler._defaultTextColorBrush, handler._defaultTextColorFocusBrush, handler._queryTextBox);
 }
        public static void MapFont(SearchBarHandler handler, ISearchBar searchBar)
        {
            var fontManager = handler.GetRequiredService <IFontManager>();

            handler.QueryEditor?.UpdateFont(searchBar, fontManager);
        }
Exemplo n.º 12
0
 public static void MapHorizontalTextAlignment(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.TypedNativeView?.UpdateHorizontalTextAlignment(searchBar, handler._textField);
 }
Exemplo n.º 13
0
 public static void MapPlaceholderColor(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.PlatformView?.UpdatePlaceholder(searchBar, handler._editor);
 }
Exemplo n.º 14
0
 public static void MapIsReadOnly(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.PlatformView?.UpdateIsReadOnly(searchBar);
 }
Exemplo n.º 15
0
 public static void MapMaxLength(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.PlatformView?.UpdateMaxLength(searchBar);
 }
Exemplo n.º 16
0
 public static void MapIsTextPredictionEnabled(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.PlatformView?.UpdateIsTextPredictionEnabled(searchBar, handler?._editor);
 }
Exemplo n.º 17
0
 public static void MapVerticalTextAlignment(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.PlatformView?.UpdateVerticalTextAlignment(searchBar, handler?._editor);
 }
 public static void MapCancelButtonColor(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateCancelButton(searchBar, handler._cancelButtonTextColorDefaultNormal, handler._cancelButtonTextColorDefaultHighlighted, handler._cancelButtonTextColorDefaultDisabled);
 }
Exemplo n.º 19
0
 public static void MapCharacterSpacing(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateCharacterSpacing(searchBar);
 }
Exemplo n.º 20
0
 public static void MapPlaceholderColor(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.PlatformView?.UpdatePlaceholderColor(searchBar, handler._defaultPlaceholderColorBrush, handler._defaultPlaceholderColorFocusBrush, handler._queryTextBox);
 }
Exemplo n.º 21
0
 public static void MapHorizontalTextAlignment(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateHorizontalTextAlignment(searchBar, handler._queryTextBox);
 }
Exemplo n.º 22
0
 public static void MapMaxLength(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateMaxLength(searchBar, handler.QueryEditor);
 }
Exemplo n.º 23
0
 public static void MapMaxLength(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateMaxLength(searchBar, handler._queryTextBox);
 }
Exemplo n.º 24
0
 public static void MapCancelButtonColor(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateCancelButtonColor(searchBar);
 }
Exemplo n.º 25
0
 public static void MapText(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateText(searchBar);
 }
Exemplo n.º 26
0
 // This is a Android-specific mapping
 public static void MapBackground(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateBackground(searchBar, DefaultBackground);
 }
Exemplo n.º 27
0
        public static void MapFont(SearchBarHandler handler, ISearchBar searchBar)
        {
            var fontManager = handler.GetRequiredService <IFontManager>();

            handler.NativeView?.UpdateFont(searchBar, fontManager, handler._editText);
        }
Exemplo n.º 28
0
 public static void MapPlaceholderColor(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdatePlaceholderColor(searchBar, DefaultPlaceholderTextColors, handler._editText);
 }
Exemplo n.º 29
0
 public static void MapCharacterSpacing(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.QueryEditor?.UpdateCharacterSpacing(searchBar);
 }
Exemplo n.º 30
0
 public static void MapIsTextPredictionEnabled(SearchBarHandler handler, ISearchBar searchBar)
 {
     handler.NativeView?.UpdateIsTextPredictionEnabled(searchBar, handler.QueryEditor);
 }