AutoSuggestBox class¶
Attributes: [ToolboxItem(true)] [ToolboxBitmap] [TemplatePart] [TemplatePart] [TemplatePart]
Defined in
Namespace: CrissCross.WPF.UI.Controls
Assembly: CrissCross.WPF.UI.dll
Full name: CrissCross.WPF.UI.Controls.AutoSuggestBox
Modifiers: public
Summary¶
Represents a text control that makes suggestions to users as they enter text using a keyboard. The app is notified when text has been changed by the user and is responsible for providing relevant suggestions for this control to display.
Applies to
net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481
Class hierarchy
classDiagram
class AutoSuggestBox
class ItemsControl
ItemsControl <|-- AutoSuggestBox
class IIconControl {
<>
}
IIconControl <|.. AutoSuggestBox
Inherits from: ItemsControl
Implements: IIconControl
Examples¶
<ui:AutoSuggestBox x:Name="AutoSuggestBox" PlaceholderText="Search">
<ui:AutoSuggestBox.Icon>
<ui:IconSourceElement>
<ui:SymbolIconSource Symbol="Search24" />
</ui:IconSourceElement>
</ui:AutoSuggestBox.Icon>
</ui:AutoSuggestBox>
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [AutoSuggestBox](# class. |
Properties¶
| Name | Summary |
|---|---|
| OriginalItemsSource | Gets or sets your items here if you want to use the default filtering. |
| IsSuggestionListOpen | Gets or sets a value indicating whether the drop-down portion of the [AutoSuggestBox](# is open. |
| Text | Gets or sets the text that is shown in the control. |
| PlaceholderText | Gets or sets the placeholder text to be displayed in the control. |
| MaxSuggestionListHeight | Gets or sets the maximum height for the drop-down portion of the [AutoSuggestBox](# control. |
| UpdateTextOnSelect | Gets or sets a value indicating whether items in the view will trigger an update of the editable text part of the [AutoSuggestBox](# when clicked. |
| Icon | Gets or sets displayed [IconElement](# |
| FocusCommand | Gets command used for focusing control. |
Fields¶
| Name | Summary |
|---|---|
| static OriginalItemsSourceProperty | Property for [OriginalItemsSource](# |
| static IsSuggestionListOpenProperty | Property for [IsSuggestionListOpen](# |
| static TextProperty | Property for [Text](# |
| static PlaceholderTextProperty | Property for [PlaceholderText](# |
| static UpdateTextOnSelectProperty | Property for [UpdateTextOnSelect](# |
| static MaxSuggestionListHeightProperty | Property for [MaxSuggestionListHeight](# |
| static IconProperty | Property for [Icon](# |
| static FocusCommandProperty | Property for [FocusCommand](# |
| static QuerySubmittedEvent | Routed event for [QuerySubmitted](# |
| static SuggestionChosenEvent | Routed event for [SuggestionChosen](# |
| static TextChangedEvent | Routed event for [TextChanged](# |
| static ElementTextBox | The element text box. |
| static ElementSuggestionsPopup | The element suggestions popup. |
| static ElementSuggestionsList | The element suggestions list. |
| TextBox | The text box. |
| SuggestionsPopup | The suggestions popup. |
| SuggestionsList | The suggestions list. |
Methods¶
| Name | Summary |
|---|---|
| OnApplyTemplate | Called when [apply template]. |
| Focus | |
| GetTemplateChild | Gets the template child. |
| AcquireTemplateResources | Acquires the template resources. |
| ReleaseTemplateResources | Releases the template resources. |
| OnQuerySubmitted | Method for [QuerySubmitted](# |
| OnSuggestionChosen | Method for [SuggestionChosen](# |
| OnTextChanged | Method for [TextChanged](# |
Events¶
| Name | Summary |
|---|---|
| QuerySubmitted | Occurs when the user submits a search query. |
| SuggestionChosen | Event occurs when the user selects an item from the recommended ones. |
| TextChanged | Raised after the text content of the editable control component is updated. |