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); }
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); }
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); }
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); }
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); }
public static void MapCancelButtonColor(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdateCancelButtonColor(searchBar, handler._cancelButton, handler._defaultDeleteButtonBackgroundColorBrush, handler._defaultDeleteButtonForegroundColorBrush); }
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); }
public static void MapHorizontalTextAlignment(SearchBarHandler handler, ISearchBar searchBar) { handler.TypedNativeView?.UpdateHorizontalTextAlignment(searchBar, handler._textField); }
public static void MapPlaceholderColor(SearchBarHandler handler, ISearchBar searchBar) { handler.PlatformView?.UpdatePlaceholder(searchBar, handler._editor); }
public static void MapIsReadOnly(SearchBarHandler handler, ISearchBar searchBar) { handler.PlatformView?.UpdateIsReadOnly(searchBar); }
public static void MapMaxLength(SearchBarHandler handler, ISearchBar searchBar) { handler.PlatformView?.UpdateMaxLength(searchBar); }
public static void MapIsTextPredictionEnabled(SearchBarHandler handler, ISearchBar searchBar) { handler.PlatformView?.UpdateIsTextPredictionEnabled(searchBar, handler?._editor); }
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); }
public static void MapCharacterSpacing(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdateCharacterSpacing(searchBar); }
public static void MapPlaceholderColor(SearchBarHandler handler, ISearchBar searchBar) { handler.PlatformView?.UpdatePlaceholderColor(searchBar, handler._defaultPlaceholderColorBrush, handler._defaultPlaceholderColorFocusBrush, handler._queryTextBox); }
public static void MapHorizontalTextAlignment(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdateHorizontalTextAlignment(searchBar, handler._queryTextBox); }
public static void MapMaxLength(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdateMaxLength(searchBar, handler.QueryEditor); }
public static void MapMaxLength(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdateMaxLength(searchBar, handler._queryTextBox); }
public static void MapCancelButtonColor(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdateCancelButtonColor(searchBar); }
public static void MapText(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdateText(searchBar); }
// This is a Android-specific mapping public static void MapBackground(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdateBackground(searchBar, DefaultBackground); }
public static void MapFont(SearchBarHandler handler, ISearchBar searchBar) { var fontManager = handler.GetRequiredService <IFontManager>(); handler.NativeView?.UpdateFont(searchBar, fontManager, handler._editText); }
public static void MapPlaceholderColor(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdatePlaceholderColor(searchBar, DefaultPlaceholderTextColors, handler._editText); }
public static void MapCharacterSpacing(SearchBarHandler handler, ISearchBar searchBar) { handler.QueryEditor?.UpdateCharacterSpacing(searchBar); }
public static void MapIsTextPredictionEnabled(SearchBarHandler handler, ISearchBar searchBar) { handler.NativeView?.UpdateIsTextPredictionEnabled(searchBar, handler.QueryEditor); }