SearchHandler Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides search functionality in a Shell application.
public ref class SearchHandler : Microsoft::Maui::Controls::BindableObject, Microsoft::Maui::Controls::Internals::IFontElement, Microsoft::Maui::Controls::ISearchHandlerController, Microsoft::Maui::Controls::ITextAlignmentElement, Microsoft::Maui::Controls::ITextElement
public ref class SearchHandler : Microsoft::Maui::Controls::BindableObject, Microsoft::Maui::Controls::Internals::IFontElement, Microsoft::Maui::Controls::ISearchHandlerController
public class SearchHandler : Microsoft.Maui.Controls.BindableObject, Microsoft.Maui.Controls.Internals.IFontElement, Microsoft.Maui.Controls.ISearchHandlerController, Microsoft.Maui.Controls.ITextAlignmentElement, Microsoft.Maui.Controls.ITextElement
public class SearchHandler : Microsoft.Maui.Controls.BindableObject, Microsoft.Maui.Controls.Internals.IFontElement, Microsoft.Maui.Controls.ISearchHandlerController
type SearchHandler = class
inherit BindableObject
interface ISearchHandlerController
interface IFontElement
interface ITextElement
interface ITextAlignmentElement
type SearchHandler = class
inherit BindableObject
interface ISearchHandlerController
interface IFontElement
Public Class SearchHandler
Inherits BindableObject
Implements IFontElement, ISearchHandlerController, ITextAlignmentElement, ITextElement
Public Class SearchHandler
Inherits BindableObject
Implements IFontElement, ISearchHandlerController
- Inheritance
- Implements
Constructors
| Name | Description |
|---|---|
| SearchHandler() | |
Fields
Properties
| Name | Description |
|---|---|
| AutomationId | |
| BackgroundColor |
Gets or sets the background color of the search box. This is a bindable property. |
| BindingContext |
Gets or sets an object that contains the properties that will be targeted by the bound properties that belong to this BindableObject. This is a bindable property. (Inherited from BindableObject) |
| CancelButtonColor |
Gets or sets the color of the cancel button. This is a bindable property. |
| CharacterSpacing |
Gets or sets the character spacing for the search text. This is a bindable property. |
| ClearIcon |
Gets or sets the icon displayed for the clear button. This is a bindable property. |
| ClearIconHelpText |
Gets or sets the accessibility help text for the clear icon. This is a bindable property. |
| ClearIconName |
Gets or sets the accessibility name for the clear icon. This is a bindable property. |
| ClearPlaceholderCommand |
Gets or sets the command invoked when the clear placeholder button is pressed. This is a bindable property. |
| ClearPlaceholderCommandParameter |
Gets or sets the parameter passed to ClearPlaceholderCommand. This is a bindable property. |
| ClearPlaceholderEnabled |
Gets or sets a value indicating whether the clear placeholder button is enabled. This is a bindable property. |
| ClearPlaceholderHelpText |
Gets or sets the accessibility help text for the clear placeholder icon. This is a bindable property. |
| ClearPlaceholderIcon |
Gets or sets the icon displayed for the clear placeholder button. This is a bindable property. |
| ClearPlaceholderName |
Gets or sets the accessibility name for the clear placeholder icon. This is a bindable property. |
| Command |
Gets or sets the command invoked when the search query is confirmed. This is a bindable property. |
| CommandParameter |
Gets or sets the parameter passed to Command. This is a bindable property. |
| Dispatcher |
Gets the dispatcher that was available when this bindable object was created, otherwise tries to find the nearest available dispatcher (probably the window's/app's). (Inherited from BindableObject) |
| DisplayMemberName |
Obsolete.
Gets or sets the name of the property to display for search results. This is a bindable property. |
| FontAttributes |
Gets or sets the font attributes for the search text. This is a bindable property. |
| FontAutoScalingEnabled | |
| FontFamily |
Gets or sets the font family for the search text. This is a bindable property. |
| FontSize |
Gets or sets the font size for the search text. This is a bindable property. |
| HorizontalTextAlignment |
Gets or sets the horizontal alignment of the search text. This is a bindable property. |
| IsFocused |
Gets a value indicating whether this search handler currently has focus. This is a bindable property. |
| IsSearchEnabled |
Gets or sets a value indicating whether search is enabled. This is a bindable property. |
| ItemsSource |
Gets or sets the collection of items to display as search suggestions. This is a bindable property. |
| ItemTemplate |
Gets or sets the template for displaying search result items. This is a bindable property. |
| Keyboard |
Gets or sets the keyboard type for the search input. This is a bindable property. |
| Placeholder |
Gets or sets the text displayed when the search box is empty. This is a bindable property. |
| PlaceholderColor |
Gets or sets the color of the placeholder text. This is a bindable property. |
| Query |
Gets or sets the current search query text. This is a bindable property. |
| QueryIcon |
Gets or sets the icon displayed for the search query. This is a bindable property. |
| QueryIconHelpText |
Gets or sets the accessibility help text for the query icon. This is a bindable property. |
| QueryIconName |
Gets or sets the accessibility name for the query icon. This is a bindable property. |
| SearchBoxVisibility |
Gets or sets the visibility mode of the search box. This is a bindable property. |
| SelectedItem |
Gets the currently selected search result item. This is a bindable property. |
| ShowsResults |
Gets or sets a value indicating whether search results are displayed. This is a bindable property. |
| TextColor |
Gets or sets the color of the search text. This is a bindable property. |
| TextTransform |
Gets or sets the text transformation applied to the search text. This is a bindable property. |
| VerticalTextAlignment |
Gets or sets the vertical alignment of the search text. This is a bindable property. |
Methods
| Name | Description |
|---|---|
| ApplyBindings() |
Applies all the current bindings to BindingContext. (Inherited from BindableObject) |
| ClearValue(BindableProperty) |
Clears any value that is previously set for a bindable property. (Inherited from BindableObject) |
| ClearValue(BindablePropertyKey) |
Clears any value that is previously set for a bindable property, identified by its key. (Inherited from BindableObject) |
| CoerceValue(BindableProperty) |
Coerces the value of the specified bindable property. This is done by invoking BindableProperty.CoerceValueDelegate of the specified bindable property. (Inherited from BindableObject) |
| CoerceValue(BindablePropertyKey) |
Coerces the value of the specified bindable property. This is done by invoking BindableProperty.CoerceValueDelegate of the specified bindable property. (Inherited from BindableObject) |
| Focus() |
Sets focus to the search handler, causing the input field to become the current focus. |
| GetValue(BindableProperty) |
Returns the value that is contained in the given bindable property. (Inherited from BindableObject) |
| HideSoftInputAsync() | |
| IsSet(BindableProperty) |
Determines whether or not a bindable property exists and has a value set. (Inherited from BindableObject) |
| OnBindingContextChanged() |
Raises the BindingContextChanged event. (Inherited from BindableObject) |
| OnClearPlaceholderClicked() | |
| OnFocused() | |
| OnItemSelected(Object) | |
| OnPropertyChanged(String) |
Raises the PropertyChanged event. (Inherited from BindableObject) |
| OnPropertyChanging(String) |
Raises the PropertyChanging event. (Inherited from BindableObject) |
| OnQueryChanged(String, String) | |
| OnQueryConfirmed() | |
| OnUnfocus() | |
| RemoveBinding(BindableProperty) |
Removes a previously set binding from a bindable property. (Inherited from BindableObject) |
| SetBinding(BindableProperty, BindingBase) |
Assigns a binding to a bindable property. (Inherited from BindableObject) |
| SetIsFocused(Boolean) |
Sets the value of the IsFocused property. For internal use by platform renderers. |
| SetValue(BindableProperty, Object) |
Sets the value of the specified bindable property. (Inherited from BindableObject) |
| SetValue(BindablePropertyKey, Object) |
Sets the value of the specified bindable property. (Inherited from BindableObject) |
| ShowSoftInputAsync() | |
| UnapplyBindings() |
Removes all current bindings from the current context. (Inherited from BindableObject) |
| Unfocus() |
Removes focus from the search handler. |
| UpdateFormsText(String, TextTransform) |
Returns the transformed text using the specified TextTransform. |
Events
| Name | Description |
|---|---|
| BindingContextChanged |
Occurs when the value of the BindingContext property changes. (Inherited from BindableObject) |
| FocusChangeRequested | |
| Focused | |
| PropertyChanged |
Occurs when a property value changes. (Inherited from BindableObject) |
| PropertyChanging |
Occurs when a property value is changing. (Inherited from BindableObject) |
| Unfocused | |
Explicit Interface Implementations
Extension Methods
| Name | Description |
|---|---|
| GetPropertyIfSet<T>(BindableObject, BindableProperty, T) | |
| SetAppTheme<T>(BindableObject, BindableProperty, T, T) | |
| SetAppThemeColor(BindableObject, BindableProperty, Color, Color) | |
| SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String) |
Creates and applies a binding to a property. |
| SetBinding<TSource,TProperty>(BindableObject, BindableProperty, Func<TSource,TProperty>, BindingMode, IValueConverter, Object, String, Object, Object, Object) |
Creates a binding between a property on the source object and a property on the target object. |
| ToFont(IFontElement, Nullable<Double>) | |