语言

SearchHandler 类

定义

在应用程序中提供搜索功能 Shell 。

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
继承
SearchHandler
实现

构造函数

名称 说明
SearchHandler()

在应用程序中提供搜索功能 Shell 。

字段

名称 说明
AutomationIdProperty

的可绑定属性 AutomationId。

BackgroundColorProperty

的可绑定属性 BackgroundColor。

CancelButtonColorProperty

的可绑定属性 CancelButtonColor。

CharacterSpacingProperty

的可绑定属性 CharacterSpacing。

ClearIconHelpTextProperty

的可绑定属性 ClearIconHelpText。

ClearIconNameProperty

的可绑定属性 ClearIconName。

ClearIconProperty

的可绑定属性 ClearIcon。

ClearPlaceholderCommandParameterProperty

的可绑定属性 ClearPlaceholderCommandParameter。

ClearPlaceholderCommandProperty

的可绑定属性 ClearPlaceholderCommand。

ClearPlaceholderEnabledProperty

的可绑定属性 ClearPlaceholderEnabled。

ClearPlaceholderHelpTextProperty

的可绑定属性 ClearPlaceholderHelpText。

ClearPlaceholderIconProperty

的可绑定属性 ClearPlaceholderIcon。

ClearPlaceholderNameProperty

的可绑定属性 ClearPlaceholderName。

CommandParameterProperty

的可绑定属性 CommandParameter。

CommandProperty

的可绑定属性 Command。

DisplayMemberNameProperty

的可绑定属性 DisplayMemberName。

FontAttributesProperty

的可绑定属性 FontAttributes。

FontAutoScalingEnabledProperty

的可绑定属性 FontAutoScalingEnabled。

FontFamilyProperty

的可绑定属性 FontFamily。

FontSizeProperty

的可绑定属性 FontSize。

HorizontalTextAlignmentProperty

的可绑定属性 HorizontalTextAlignment。

IsFocusedProperty

的可绑定属性 IsFocused。

IsFocusedPropertyKey

的可绑定属性键 IsFocused。

IsSearchEnabledProperty

的可绑定属性 IsSearchEnabled。

ItemsSourceProperty

的可绑定属性 ItemsSource。

ItemTemplateProperty

的可绑定属性 ItemTemplate。

KeyboardProperty

的可绑定属性 Keyboard。

PlaceholderColorProperty

的可绑定属性 PlaceholderColor。

PlaceholderProperty

的可绑定属性 Placeholder。

QueryIconHelpTextProperty

的可绑定属性 QueryIconHelpText。

QueryIconNameProperty

的可绑定属性 QueryIconName。

QueryIconProperty

的可绑定属性 QueryIcon。

QueryProperty

的可绑定属性 Query。

SearchBoxVisibilityProperty

的可绑定属性 SearchBoxVisibility。

SelectedItemProperty

的可绑定属性 SelectedItem。

ShowsResultsProperty

的可绑定属性 ShowsResults。

TextColorProperty

的可绑定属性 TextColor。

TextTransformProperty

的可绑定属性 TextTransform。

VerticalTextAlignmentProperty

的可绑定属性 VerticalTextAlignment。

属性

名称 说明
AutomationId

在应用程序中提供搜索功能 Shell 。

BackgroundColor

获取或设置搜索框的背景色。 这是一种可绑定属性。

BindingContext

获取或设置一个对象,该对象包含由属于此 BindableObject属性的绑定属性所面向的属性。 这是一种可绑定属性。

(继承自 BindableObject)
CancelButtonColor

获取或设置取消按钮的颜色。 这是一种可绑定属性。

CharacterSpacing

获取或设置搜索文本的字符间距。 这是一种可绑定属性。

ClearIcon

获取或设置为清除按钮显示的图标。 这是一种可绑定属性。

ClearIconHelpText

获取或设置清除图标的辅助功能帮助文本。 这是一种可绑定属性。

ClearIconName

获取或设置清除图标的辅助功能名称。 这是一种可绑定属性。

ClearPlaceholderCommand

获取或设置在按下清除占位符按钮时调用的命令。 这是一种可绑定属性。

ClearPlaceholderCommandParameter

获取或设置传递给 ClearPlaceholderCommand.. 这是一种可绑定属性。

ClearPlaceholderEnabled

获取或设置一个值,该值指示是否启用清除占位符按钮。 这是一种可绑定属性。

ClearPlaceholderHelpText

获取或设置清除占位符图标的辅助功能帮助文本。 这是一种可绑定属性。

ClearPlaceholderIcon

获取或设置为清除占位符按钮显示的图标。 这是一种可绑定属性。

ClearPlaceholderName

获取或设置清除占位符图标的辅助功能名称。 这是一种可绑定属性。

Command

获取或设置在确认搜索查询时调用的命令。 这是一种可绑定属性。

CommandParameter

获取或设置传递给 Command.. 这是一种可绑定属性。

Dispatcher

获取创建此可绑定对象时可用的调度程序,否则会尝试查找最近的可用调度程序(可能是窗口的/应用)。

(继承自 BindableObject)
DisplayMemberName
已过时.

获取或设置要为搜索结果显示的属性的名称。 这是一种可绑定属性。

FontAttributes

获取或设置搜索文本的字体属性。 这是一种可绑定属性。

FontAutoScalingEnabled

在应用程序中提供搜索功能 Shell 。

FontFamily

获取或设置搜索文本的字体系列。 这是一种可绑定属性。

FontSize

获取或设置搜索文本的字号。 这是一种可绑定属性。

HorizontalTextAlignment

获取或设置搜索文本的水平对齐方式。 这是一种可绑定属性。

IsFocused

获取一个值,该值指示此搜索处理程序当前是否具有焦点。 这是一种可绑定属性。

IsSearchEnabled

获取或设置一个值,该值指示是否启用搜索。 这是一种可绑定属性。

ItemsSource

获取或设置要显示为搜索建议的项的集合。 这是一种可绑定属性。

ItemTemplate

获取或设置用于显示搜索结果项的模板。 这是一种可绑定属性。

Keyboard

获取或设置搜索输入的键盘类型。 这是一种可绑定属性。

Placeholder

获取或设置搜索框为空时显示的文本。 这是一种可绑定属性。

PlaceholderColor

获取或设置占位符文本的颜色。 这是一种可绑定属性。

Query

获取或设置当前搜索查询文本。 这是一种可绑定属性。

QueryIcon

获取或设置为搜索查询显示的图标。 这是一种可绑定属性。

QueryIconHelpText

获取或设置查询图标的辅助功能帮助文本。 这是一种可绑定属性。

QueryIconName

获取或设置查询图标的辅助功能名称。 这是一种可绑定属性。

SearchBoxVisibility

获取或设置搜索框的可见性模式。 这是一种可绑定属性。

SelectedItem

获取当前选定的搜索结果项。 这是一种可绑定属性。

ShowsResults

获取或设置一个值,该值指示是否显示搜索结果。 这是一种可绑定属性。

TextColor

获取或设置搜索文本的颜色。 这是一种可绑定属性。

TextTransform

获取或设置应用于搜索文本的文本转换。 这是一种可绑定属性。

VerticalTextAlignment

获取或设置搜索文本的垂直对齐方式。 这是一种可绑定属性。

方法

名称 说明
ApplyBindings()

将所有当前绑定应用于 BindingContext。

(继承自 BindableObject)
ClearValue(BindableProperty)

清除以前为可绑定属性设置的任何值。

(继承自 BindableObject)
ClearValue(BindablePropertyKey)

清除以前为其键标识的可绑定属性设置的任何值。

(继承自 BindableObject)
CoerceValue(BindableProperty)

强制指定可绑定属性的值。 这是通过调用 BindableProperty.CoerceValueDelegate 指定的可绑定属性来完成的。

(继承自 BindableObject)
CoerceValue(BindablePropertyKey)

强制指定可绑定属性的值。 这是通过调用 BindableProperty.CoerceValueDelegate 指定的可绑定属性来完成的。

(继承自 BindableObject)
Focus()

将焦点设置为搜索处理程序,导致输入字段成为当前焦点。

GetValue(BindableProperty)

返回给定可绑定属性中包含的值。

(继承自 BindableObject)
HideSoftInputAsync()

在应用程序中提供搜索功能 Shell 。

IsSet(BindableProperty)

确定可绑定属性是否存在并设置了值。

(继承自 BindableObject)
OnBindingContextChanged()

引发 BindingContextChanged 事件。

(继承自 BindableObject)
OnClearPlaceholderClicked()

在应用程序中提供搜索功能 Shell 。

OnFocused()

在应用程序中提供搜索功能 Shell 。

OnItemSelected(Object)

在应用程序中提供搜索功能 Shell 。

OnPropertyChanged(String)

引发 PropertyChanged 事件。

(继承自 BindableObject)
OnPropertyChanging(String)

引发 PropertyChanging 事件。

(继承自 BindableObject)
OnQueryChanged(String, String)

在应用程序中提供搜索功能 Shell 。

OnQueryConfirmed()

在应用程序中提供搜索功能 Shell 。

OnUnfocus()

在应用程序中提供搜索功能 Shell 。

RemoveBinding(BindableProperty)

从可绑定属性中删除以前设置的绑定。

(继承自 BindableObject)
SetBinding(BindableProperty, BindingBase)

将绑定分配给可绑定属性。

(继承自 BindableObject)
SetIsFocused(Boolean)

设置属性的值 IsFocused 。 供平台呈现器内部使用。

SetValue(BindableProperty, Object)

设置指定的可绑定属性的值。

(继承自 BindableObject)
SetValue(BindablePropertyKey, Object)

设置指定的可绑定属性的值。

(继承自 BindableObject)
ShowSoftInputAsync()

在应用程序中提供搜索功能 Shell 。

UnapplyBindings()

从当前上下文中删除所有当前绑定。

(继承自 BindableObject)
Unfocus()

从搜索处理程序中删除焦点。

UpdateFormsText(String, TextTransform)

使用指定的 TextTransform值返回转换后的文本。

事件

名称 说明
BindingContextChanged

当 BindingContext 属性的值更改时发生。

(继承自 BindableObject)
FocusChangeRequested

在应用程序中提供搜索功能 Shell 。

Focused

在应用程序中提供搜索功能 Shell 。

PropertyChanged

在属性值更改时发生。

(继承自 BindableObject)
PropertyChanging

在属性值更改时发生。

(继承自 BindableObject)
Unfocused

在应用程序中提供搜索功能 Shell 。

显式接口实现

名称 说明
IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)

在应用程序中提供搜索功能 Shell 。

(继承自 BindableObject)
IFontElement.FontSizeDefaultValueCreator()

在应用程序中提供搜索功能 Shell 。

IFontElement.OnFontAttributesChanged(FontAttributes, FontAttributes)

在应用程序中提供搜索功能 Shell 。

IFontElement.OnFontAutoScalingEnabledChanged(Boolean, Boolean)

在应用程序中提供搜索功能 Shell 。

IFontElement.OnFontFamilyChanged(String, String)

在应用程序中提供搜索功能 Shell 。

IFontElement.OnFontSizeChanged(Double, Double)

在应用程序中提供搜索功能 Shell 。

ISearchHandlerController.ClearPlaceholderClicked()

在应用程序中提供搜索功能 Shell 。

ISearchHandlerController.ItemSelected(Object)

在应用程序中提供搜索功能 Shell 。

ISearchHandlerController.ListProxy

在应用程序中提供搜索功能 Shell 。

ISearchHandlerController.ListProxyChanged

在应用程序中提供搜索功能 Shell 。

ISearchHandlerController.QueryConfirmed()

在应用程序中提供搜索功能 Shell 。

ITextAlignmentElement.OnHorizontalTextAlignmentPropertyChanged(TextAlignment, TextAlignment)

在应用程序中提供搜索功能 Shell 。

ITextElement.OnCharacterSpacingPropertyChanged(Double, Double)

在应用程序中提供搜索功能 Shell 。

ITextElement.OnTextColorPropertyChanged(Color, Color)

在应用程序中提供搜索功能 Shell 。

ITextElement.OnTextTransformChanged(TextTransform, TextTransform)

在应用程序中提供搜索功能 Shell 。

扩展方法

名称 说明
GetPropertyIfSet<T>(BindableObject, BindableProperty, T)

在应用程序中提供搜索功能 Shell 。

SetAppTheme<T>(BindableObject, BindableProperty, T, T)

在应用程序中提供搜索功能 Shell 。

SetAppThemeColor(BindableObject, BindableProperty, Color, Color)

在应用程序中提供搜索功能 Shell 。

SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String)

创建绑定并将其应用到属性。

SetBinding<TSource,TProperty>(BindableObject, BindableProperty, Func<TSource,TProperty>, BindingMode, IValueConverter, Object, String, Object, Object, Object)

在源对象上的属性和目标对象的属性之间创建绑定。

ToFont(IFontElement, Nullable<Double>)

在应用程序中提供搜索功能 Shell 。

适用于