
'Declaration
<DefaultPropertyAttribute("ItemsSource")> <ContentPropertyAttribute("ItemsSource")> Public Class AutoCompleteTextBox Inherits TextBox Implements Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.Controls.ILayout, Microsoft.Maui.Controls.ILayoutController, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IContentView, Microsoft.Maui.IContextFlyoutElement, Microsoft.Maui.ICrossPlatformLayout, Microsoft.Maui.IElement, Microsoft.Maui.IPadding, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.IToolTipElement, Microsoft.Maui.ITransform, Microsoft.Maui.IView, Microsoft.Maui.IVisualTreeElement
'Usage
Dim instance As AutoCompleteTextBox
[DefaultProperty("ItemsSource")] [ContentProperty("ItemsSource")] public class AutoCompleteTextBox : TextBox, Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.Controls.ILayout, Microsoft.Maui.Controls.ILayoutController, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IContentView, Microsoft.Maui.IContextFlyoutElement, Microsoft.Maui.ICrossPlatformLayout, Microsoft.Maui.IElement, Microsoft.Maui.IPadding, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.IToolTipElement, Microsoft.Maui.ITransform, Microsoft.Maui.IView, Microsoft.Maui.IVisualTreeElement
The suggestions are based on the provided ItemsSource.
The filtering of this ItemsSource can be customized to provide more flexibility in the available values.
The appearance of the filtered items can also be customized to give them a specific look.
The following code would display these results if a user types the letter "a" inside the AutoCompleteTextBox:
<xctk:AutoCompleteTextBox ClearButtonVisibility="WhileEditing" WidthRequest="200"> <xctk:AutoCompleteTextBox.ItemsSource> <x:Array Type="{x:Type x:String}"> <x:String>Alpha</x:String> <x:String>American</x:String> <x:String>Arabic</x:String> <x:String>Amphibian</x:String> <x:String>Boat</x:String> <x:String>Car</x:String> </x:Array> </xctk:AutoCompleteTextBox.ItemsSource> <xctk:AutoCompleteTextBox.ItemTemplate> <DataTemplate> <Label Text="{Binding}" TextColor="White" FontSize="18" Margin="5"/> </DataTemplate> </xctk:AutoCompleteTextBox.ItemTemplate> </xctk:AutoCompleteTextBox>
System.Object
Microsoft.Maui.Controls.BindableObject
Microsoft.Maui.Controls.Element
Microsoft.Maui.Controls.NavigableElement
Microsoft.Maui.Controls.VisualElement
Microsoft.Maui.Controls.View
Microsoft.Maui.Controls.Compatibility.Layout
Microsoft.Maui.Controls.TemplatedView
Xceed.Maui.Toolkit.Control
Xceed.Maui.Toolkit.TextBox
Xceed.Maui.Toolkit.AutoCompleteTextBox
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2