AutoCompleteBox Class

Represents a control that provides a text box for user input and a drop-down that contains possible matches based on the input in the text box.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
[TemplatePartAttribute("PART_Popup", typeof(Popup))]
[TemplatePartAttribute("PART_SelectingItemsControl", typeof(SelectingItemsControl))]
[TemplatePartAttribute("PART_SelectionAdapter", typeof(ISelectionAdapter))]
[TemplatePartAttribute("PART_TextBox", typeof(TextBox))]
[PseudoClassesAttribute(new string[] { ... })]
public class AutoCompleteBox : TemplatedControl
Inheritance
Object    AvaloniaObject    Animatable    StyledElement    Visual    Layoutable    Interactive    InputElement    Control    TemplatedControl    AutoCompleteBox

Constructors

AutoCompleteBox Initializes a new instance of the AutoCompleteBox class.

Properties

ActualThemeVariant
(Inherited from StyledElement)
AsyncPopulator 
Background Gets or sets the brush used to draw the control's background.
(Inherited from TemplatedControl)
BackgroundSizing Gets or sets how the control's background is drawn relative to the control's border.
(Inherited from TemplatedControl)
BorderBrush Gets or sets the brush used to draw the control's border.
(Inherited from TemplatedControl)
BorderThickness Gets or sets the thickness of the control's border.
(Inherited from TemplatedControl)
Bounds
(Inherited from Visual)
BypassFlowDirectionPolicies
(Inherited from Visual)
CaretIndex Gets or sets the caret index
Classes
(Inherited from StyledElement)
Clip
(Inherited from Visual)
ClipToBounds
(Inherited from Visual)
ContextFlyout Gets or sets a context flyout to the control
(Inherited from Control)
ContextMenu Gets or sets a context menu to the control.
(Inherited from Control)
CornerRadius Gets or sets the radius of the border rounded corners.
(Inherited from TemplatedControl)
Cursor
(Inherited from InputElement)
DataContext
(Inherited from StyledElement)
DataTemplates Gets or sets the data templates for the control.
(Inherited from Control)
DesiredSize
(Inherited from Layoutable)
Effect
(Inherited from Visual)
FilterMode Gets or sets how the text in the text box is used to filter items specified by the ItemsSource property for display in the drop-down.
FlowDirection
(Inherited from Visual)
Focusable
(Inherited from InputElement)
FocusAdorner Gets or sets the control's focus adorner.
(Inherited from Control)
FontFamily Gets or sets the font family used to draw the control's text.
(Inherited from TemplatedControl)
FontFeatures Gets or sets the font features turned on/off.
(Inherited from TemplatedControl)
FontSize Gets or sets the size of the control's text in points.
(Inherited from TemplatedControl)
FontStretch Gets or sets the font stretch used to draw the control's text.
(Inherited from TemplatedControl)
FontStyle Gets or sets the font style used to draw the control's text.
(Inherited from TemplatedControl)
FontWeight Gets or sets the font weight used to draw the control's text.
(Inherited from TemplatedControl)
Foreground Gets or sets the brush used to draw the control's text and other foreground elements.
(Inherited from TemplatedControl)
GestureRecognizers
(Inherited from InputElement)
HasMirrorTransform
(Inherited from Visual)
Height
(Inherited from Layoutable)
HorizontalAlignment
(Inherited from Layoutable)
InheritanceParent
(Inherited from AvaloniaObject)
InnerLeftContent Gets or sets custom content that is positioned on the left side of the text layout box
InnerRightContent Gets or sets custom content that is positioned on the right side of the text layout box
IsArrangeValid
(Inherited from Layoutable)
IsDropDownOpen Gets or sets a value indicating whether the drop-down portion of the control is open.
IsEffectivelyEnabled
(Inherited from InputElement)
IsEffectivelyVisible
(Inherited from Visual)
IsEnabled
(Inherited from InputElement)
IsEnabledCore
(Inherited from InputElement)
IsFocused
(Inherited from InputElement)
IsHitTestVisible
(Inherited from InputElement)
IsInitialized
(Inherited from StyledElement)
IsKeyboardFocusWithin
(Inherited from InputElement)
IsLoaded Gets a value indicating whether the control is fully constructed in the visual tree and both layout and render are complete.
(Inherited from Control)
IsMeasureValid
(Inherited from Layoutable)
IsPointerOver
(Inherited from InputElement)
IsTabStop
(Inherited from InputElement)
IsTextCompletionEnabled Gets or sets a value indicating whether the first possible match found during the filtering process will be displayed automatically in the text box.
IsVisible
(Inherited from Visual)
Item
(Inherited from AvaloniaObject)
Item
(Inherited from AvaloniaObject)
ItemFilter Gets or sets the custom method that uses user-entered text to filter the items specified by the ItemsSource property for display in the drop-down.
ItemSelector Gets or sets the custom method that combines the user-entered text and one of the items specified by the ItemsSource.
ItemsSource Gets or sets a collection that is used to generate the items for the drop-down portion of the AutoCompleteBox control.
ItemTemplate Gets or sets the DataTemplate used to display each item in the drop-down portion of the control.
KeyBindings
(Inherited from InputElement)
LogicalChildren
(Inherited from StyledElement)
Margin
(Inherited from Layoutable)
MaxDropDownHeight Gets or sets the maximum height of the drop-down portion of the AutoCompleteBox control.
MaxHeight
(Inherited from Layoutable)
MaxLength Gets or sets the maximum number of characters that the AutoCompleteBox can accept. This constraint only applies for manually entered (user-inputted) text.
MaxWidth
(Inherited from Layoutable)
MinHeight
(Inherited from Layoutable)
MinimumPopulateDelay Gets or sets the minimum delay, after text is typed in the text box before the AutoCompleteBox control populates the list of possible matches in the drop-down.
MinimumPrefixLength Gets or sets the minimum number of characters required to be entered in the text box before the AutoCompleteBox displays possible matches.
MinWidth
(Inherited from Layoutable)
Name
(Inherited from StyledElement)
Opacity
(Inherited from Visual)
OpacityMask
(Inherited from Visual)
Padding Gets or sets the padding placed between the border of the control and its content.
(Inherited from TemplatedControl)
Parent
(Inherited from StyledElement)
PseudoClasses
(Inherited from StyledElement)
RenderTransform
(Inherited from Visual)
RenderTransformOrigin
(Inherited from Visual)
Resources
(Inherited from StyledElement)
SearchText Gets the text that is used to filter items in the ItemsSource item collection.
SelectedItem Gets or sets the selected item in the drop-down.
SelectionAdapter Gets or sets the selection adapter used to populate the drop-down with a list of selectable items.
StyleKey
(Inherited from StyledElement)
StyleKeyOverride
(Inherited from StyledElement)
Styles
(Inherited from StyledElement)
TabIndex
(Inherited from InputElement)
Tag Gets or sets a user-defined object attached to the control.
(Inherited from Control)
Template Gets or sets the template that defines the control's appearance.
(Inherited from TemplatedControl)
TemplatedParent
(Inherited from StyledElement)
Text Gets or sets the text in the text box portion of the AutoCompleteBox control.
TextFilter Gets or sets the custom method that uses the user-entered text to filter items specified by the ItemsSource property in a text-based way for display in the drop-down.
TextSelector Gets or sets the custom method that combines the user-entered text and one of the items specified by the ItemsSource in a text-based way.
Theme
(Inherited from StyledElement)
Transitions
(Inherited from Animatable)
UseLayoutRounding
(Inherited from Layoutable)
ValueMemberBinding Gets or sets the Binding that is used to get the values for display in the text portion of the AutoCompleteBox control.
VerticalAlignment
(Inherited from Layoutable)
VisualChildren
(Inherited from Visual)
VisualRoot
(Inherited from Visual)
Watermark 
Width
(Inherited from Layoutable)
ZIndex
(Inherited from Visual)

Methods

AddHandler(RoutedEvent, Delegate, RoutingStrategies, Boolean)
(Inherited from Interactive)
AddHandler``1(RoutedEventUMP, EventHandlerUMP, RoutingStrategies, Boolean)
(Inherited from Interactive)
ApplyStyling
(Inherited from StyledElement)
ApplyTemplate
(Inherited from TemplatedControl)
Arrange(Rect)
(Inherited from Layoutable)
ArrangeCore(Rect)
(Inherited from Layoutable)
ArrangeOverride(Size)
(Inherited from Layoutable)
BeginInit
(Inherited from StyledElement)
Bind(AvaloniaProperty, IBinding)
(Inherited from AvaloniaObject)
Bind(AvaloniaProperty, IObservableObject, BindingPriority)
(Inherited from AvaloniaObject)
Bind``1(DirectPropertyBaseUMP, IObservableUMP)
(Inherited from AvaloniaObject)
Bind``1(DirectPropertyBaseUMP, IObservableBindingValueUMP)
(Inherited from AvaloniaObject)
Bind``1(DirectPropertyBaseUMP, IObservableObject)
(Inherited from AvaloniaObject)
Bind``1(StyledPropertyUMP, IObservableUMP, BindingPriority)
(Inherited from AvaloniaObject)
Bind``1(StyledPropertyUMP, IObservableBindingValueUMP, BindingPriority)
(Inherited from AvaloniaObject)
Bind``1(StyledPropertyUMP, IObservableObject, BindingPriority)
(Inherited from AvaloniaObject)
BuildEventRoute(RoutedEvent)
(Inherited from Interactive)
CheckAccess
(Inherited from AvaloniaObject)
ClearValue(AvaloniaProperty)
(Inherited from AvaloniaObject)
ClearValue``1(AvaloniaPropertyUMP)
(Inherited from AvaloniaObject)
ClearValue``1(DirectPropertyBaseUMP)
(Inherited from AvaloniaObject)
ClearValue``1(StyledPropertyUMP)
(Inherited from AvaloniaObject)
CoerceValue(AvaloniaProperty)
(Inherited from AvaloniaObject)
EndInit
(Inherited from StyledElement)
Equals(Object)
(Inherited from AvaloniaObject)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Focus(NavigationMethod, KeyModifiers)
(Inherited from InputElement)
FormatValue(Object) Converts the specified object to a string by using the Converter and ConverterCulture values of the binding object specified by the ValueMemberBinding property.
GetBaseValue``1(StyledPropertyUMP)
(Inherited from AvaloniaObject)
GetHashCode
(Inherited from AvaloniaObject)
GetSelectionAdapterPart(INameScope) Returns the ISelectionAdapter part, if possible.
GetTemplateFocusTarget Gets the element that receives the focus adorner.
(Inherited from TemplatedControl)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValue(AvaloniaProperty)
(Inherited from AvaloniaObject)
GetValue``1(DirectPropertyBaseUMP)
(Inherited from AvaloniaObject)
GetValue``1(StyledPropertyUMP)
(Inherited from AvaloniaObject)
HasFocus Determines whether the text box or drop-down portion of the AutoCompleteBox control has focus.
InitializeIfNeeded
(Inherited from StyledElement)
InvalidateArrange
(Inherited from Layoutable)
InvalidateMeasure
(Inherited from Layoutable)
InvalidateMirrorTransform
(Inherited from Visual)
InvalidateVisual
(Inherited from Visual)
IsAnimating(AvaloniaProperty)
(Inherited from AvaloniaObject)
IsSet(AvaloniaProperty)
(Inherited from AvaloniaObject)
LogicalChildrenCollectionChanged(Object, NotifyCollectionChangedEventArgs)
(Inherited from Visual)
Measure(Size)
(Inherited from Layoutable)
MeasureCore(Size)
(Inherited from Layoutable)
MeasureOverride(Size)
(Inherited from Layoutable)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OnAccessKey(RoutedEventArgs)
(Inherited from InputElement)
OnApplyTemplate(TemplateAppliedEventArgs) Builds the visual tree for the AutoCompleteBox control when a new template is applied.
(Overrides TemplatedControlOnApplyTemplate(TemplateAppliedEventArgs))
OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
(Inherited from TemplatedControl)
OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
(Inherited from Visual)
OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
(Inherited from Control)
OnCreateAutomationPeer Returns a new, type-specific AutomationPeer implementation for the control.
(Inherited from Control)
OnDataContextBeginUpdate
(Inherited from StyledElement)
OnDataContextChanged(EventArgs)
(Inherited from StyledElement)
OnDataContextEndUpdate
(Inherited from StyledElement)
OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
(Inherited from TemplatedControl)
OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
(Inherited from Visual)
OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
(Inherited from Control)
OnDropDownClosed(EventArgs) Raises the DropDownClosed event.
OnDropDownClosing(CancelEventArgs) Raises the DropDownClosing event.
OnDropDownOpened(EventArgs) Raises the DropDownOpened event.
OnDropDownOpening(CancelEventArgs) Raises the DropDownOpening event.
OnGotFocus(GotFocusEventArgs) Provides handling for the GotFocus event.
(Overrides ControlOnGotFocus(GotFocusEventArgs))
OnInitialized
(Inherited from StyledElement)
OnKeyDown(KeyEventArgs) Provides handling for the KeyDown event.
(Overrides InputElement.OnKeyDown(KeyEventArgs))
OnKeyUp(KeyEventArgs)
(Inherited from Control)
OnLoaded(RoutedEventArgs) Invoked just before the Loaded event.
(Inherited from Control)
OnLostFocus(RoutedEventArgs) Provides handling for the LostFocus event.
(Overrides ControlOnLostFocus(RoutedEventArgs))
OnMeasureInvalidated
(Inherited from Layoutable)
OnPointerCaptureLost(PointerCaptureLostEventArgs)
(Inherited from InputElement)
OnPointerEntered(PointerEventArgs)
(Inherited from InputElement)
OnPointerExited(PointerEventArgs)
(Inherited from InputElement)
OnPointerMoved(PointerEventArgs)
(Inherited from InputElement)
OnPointerPressed(PointerPressedEventArgs)
(Inherited from InputElement)
OnPointerReleased(PointerReleasedEventArgs)
(Inherited from Control)
OnPointerWheelChanged(PointerWheelEventArgs)
(Inherited from InputElement)
OnPopulated(PopulatedEventArgs) Raises the Populated event.
OnPopulating(PopulatingEventArgs) Raises the Populating event.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
(Inherited from Control)
OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)
(Inherited from Animatable)
OnSelectionChanged(SelectionChangedEventArgs) Raises the SelectionChanged event.
OnSizeChanged(SizeChangedEventArgs) Invoked just before the SizeChanged event.
(Inherited from Control)
OnTemplateChanged(AvaloniaPropertyChangedEventArgs) Called when the Template property changes.
(Inherited from TemplatedControl)
OnTextChanged(TextChangedEventArgs) Raises the TextChanged event.
OnTextInput(TextInputEventArgs)
(Inherited from InputElement)
OnUnloaded(RoutedEventArgs) Invoked just before the Unloaded event.
(Inherited from Control)
OnVisualParentChanged(Visual, Visual)
(Inherited from Layoutable)
PopulateComplete Notifies the AutoCompleteBox that the Items property has been set and the data can be filtered to provide possible matches in the drop-down.
RaiseEvent(RoutedEventArgs)
(Inherited from Interactive)
RaisePropertyChanged``1(DirectPropertyBaseUMP, UMP, UMP)
(Inherited from AvaloniaObject)
RemoveHandler(RoutedEvent, Delegate)
(Inherited from Interactive)
RemoveHandler``1(RoutedEventUMP, EventHandlerUMP)
(Inherited from Interactive)
Render(DrawingContext)
(Inherited from Visual)
SetAndRaise``1(DirectPropertyBaseUMP, UMP, UMP)
(Inherited from AvaloniaObject)
SetCurrentValue(AvaloniaProperty, Object)
(Inherited from AvaloniaObject)
SetCurrentValue``1(StyledPropertyUMP, UMP)
(Inherited from AvaloniaObject)
SetValue(AvaloniaProperty, Object, BindingPriority)
(Inherited from AvaloniaObject)
SetValue``1(DirectPropertyBaseUMP, UMP)
(Inherited from AvaloniaObject)
SetValue``1(StyledPropertyUMP, UMP, BindingPriority)
(Inherited from AvaloniaObject)
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryGetResource(Object, ThemeVariant, Object)
(Inherited from StyledElement)
UpdateDataValidation(AvaloniaProperty, BindingValueType, Exception) Called to update the validation state for properties for which data validation is enabled.
(Overrides AvaloniaObject.UpdateDataValidation(AvaloniaProperty, BindingValueType, Exception))
UpdateIsEffectivelyEnabled
(Inherited from InputElement)
UpdateLayout
(Inherited from Layoutable)
VerifyAccess
(Inherited from AvaloniaObject)

Events

ActualThemeVariantChanged
(Inherited from StyledElement)
AttachedToLogicalTree
(Inherited from StyledElement)
AttachedToVisualTree
(Inherited from Visual)
ContextRequested Occurs when the user has completed a context input gesture, such as a right-click.
(Inherited from Control)
DataContextChanged
(Inherited from StyledElement)
DetachedFromLogicalTree
(Inherited from StyledElement)
DetachedFromVisualTree
(Inherited from Visual)
DoubleTapped
(Inherited from InputElement)
DropDownClosed Occurs when the IsDropDownOpen property was changed from true to false and the drop-down is open.
DropDownClosing Occurs when the IsDropDownOpen property is changing from true to false.
DropDownOpened Occurs when the value of the IsDropDownOpen property has changed from false to true and the drop-down is open.
DropDownOpening Occurs when the value of the IsDropDownOpen property is changing from false to true.
EffectiveViewportChanged
(Inherited from Layoutable)
GotFocus
(Inherited from InputElement)
Holding
(Inherited from InputElement)
Initialized
(Inherited from StyledElement)
KeyDown
(Inherited from InputElement)
KeyUp
(Inherited from InputElement)
LayoutUpdated
(Inherited from Layoutable)
Loaded Occurs when the control has been fully constructed in the visual tree and both layout and render are complete.
(Inherited from Control)
LostFocus
(Inherited from InputElement)
PointerCaptureLost
(Inherited from InputElement)
PointerEntered
(Inherited from InputElement)
PointerExited
(Inherited from InputElement)
PointerMoved
(Inherited from InputElement)
PointerPressed
(Inherited from InputElement)
PointerReleased
(Inherited from InputElement)
PointerWheelChanged
(Inherited from InputElement)
Populated Occurs when the AutoCompleteBox has populated the drop-down with possible matches based on the Text property.
Populating Occurs when the AutoCompleteBox is populating the drop-down with possible matches based on the Text property.
PropertyChanged
(Inherited from AvaloniaObject)
ResourcesChanged
(Inherited from StyledElement)
SelectionChanged Occurs when the selected item in the drop-down portion of the AutoCompleteBox has changed.
SizeChanged Occurs when the bounds (actual size) of the control have changed.
(Inherited from Control)
Tapped
(Inherited from InputElement)
TemplateApplied Raised when the control's template is applied.
(Inherited from TemplatedControl)
TextChanged Occurs asynchronously when the text in the TextBox portion of the AutoCompleteBox changes.
TextInput
(Inherited from InputElement)
TextInputMethodClientRequested
(Inherited from InputElement)
Unloaded Occurs when the control is removed from the visual tree.
(Inherited from Control)

Fields

AsyncPopulatorProperty Identifies the AsyncPopulator property.
CaretIndexProperty Defines see CaretIndex property.
FilterModeProperty Gets the identifier for the FilterMode property.
InnerLeftContentProperty Defines the InnerLeftContent property
InnerRightContentProperty Defines the InnerRightContent property
IsDropDownOpenProperty Identifies the IsDropDownOpen property.
IsTextCompletionEnabledProperty Identifies the IsTextCompletionEnabled property.
ItemFilterProperty Identifies the ItemFilter property.
ItemSelectorProperty Identifies the ItemSelector property.
ItemsSourceProperty Identifies the ItemsSource property.
ItemTemplateProperty Identifies the ItemTemplate property.
MaxDropDownHeightProperty Identifies the MaxDropDownHeight property.
MaxLengthProperty Defines the MaxLength property
MinimumPopulateDelayProperty Identifies the MinimumPopulateDelay property.
MinimumPrefixLengthProperty Identifies the MinimumPrefixLength property.
SearchTextProperty Identifies the SearchText property.
SelectedItemProperty Identifies the SelectedItem property.
SelectionChangedEvent 
TextChangedEvent Defines the TextChanged event.
TextFilterProperty Identifies the TextFilter property.
TextProperty Identifies the Text property.
TextSelectorProperty Identifies the TextSelector property.
WatermarkProperty 

Extension Methods

BringIntoView Tries to bring the control into view.
(Defined by ControlExtensions)
BringIntoView(Rect) Tries to bring the control into view.
(Defined by ControlExtensions)
FindControlT(String) Finds the named control in the scope of the specified control.
(Defined by ControlExtensions)
FindDataTemplate(Object, IDataTemplate) Find a data template that matches a piece of data.
(Defined by DataTemplateExtensions)
GetControlT(String) Finds the named control in the scope of the specified control and throws if not found.
(Defined by ControlExtensions)
GetTemplateChildren
(Defined by TemplateExtensions)

See Also