Skip to content

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

NameSummary
.ctorInitializes a new instance of the [AutoSuggestBox](# class.

Properties

NameSummary
OriginalItemsSourceGets or sets your items here if you want to use the default filtering.
IsSuggestionListOpenGets or sets a value indicating whether the drop-down portion of the [AutoSuggestBox](# is open.
TextGets or sets the text that is shown in the control.
PlaceholderTextGets or sets the placeholder text to be displayed in the control.
MaxSuggestionListHeightGets or sets the maximum height for the drop-down portion of the [AutoSuggestBox](# control.
UpdateTextOnSelectGets or sets a value indicating whether items in the view will trigger an update of the editable text part of the [AutoSuggestBox](# when clicked.
IconGets or sets displayed [IconElement](#
FocusCommandGets command used for focusing control.

Fields

NameSummary
static OriginalItemsSourcePropertyProperty for [OriginalItemsSource](#
static IsSuggestionListOpenPropertyProperty for [IsSuggestionListOpen](#
static TextPropertyProperty for [Text](#
static PlaceholderTextPropertyProperty for [PlaceholderText](#
static UpdateTextOnSelectPropertyProperty for [UpdateTextOnSelect](#
static MaxSuggestionListHeightPropertyProperty for [MaxSuggestionListHeight](#
static IconPropertyProperty for [Icon](#
static FocusCommandPropertyProperty for [FocusCommand](#
static QuerySubmittedEventRouted event for [QuerySubmitted](#
static SuggestionChosenEventRouted event for [SuggestionChosen](#
static TextChangedEventRouted event for [TextChanged](#
static ElementTextBoxThe element text box.
static ElementSuggestionsPopupThe element suggestions popup.
static ElementSuggestionsListThe element suggestions list.
TextBoxThe text box.
SuggestionsPopupThe suggestions popup.
SuggestionsListThe suggestions list.

Methods

NameSummary
OnApplyTemplateCalled when [apply template].
Focus
GetTemplateChildGets the template child.
AcquireTemplateResourcesAcquires the template resources.
ReleaseTemplateResourcesReleases the template resources.
OnQuerySubmittedMethod for [QuerySubmitted](#
OnSuggestionChosenMethod for [SuggestionChosen](#
OnTextChangedMethod for [TextChanged](#

Events

NameSummary
QuerySubmittedOccurs when the user submits a search query.
SuggestionChosenEvent occurs when the user selects an item from the recommended ones.
TextChangedRaised after the text content of the editable control component is updated.
Inherited members