Class RadAutoCompleteBox
Represents a text control that suggests possible matches based on the user's input.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Input.dll
Syntax
[TelerikToolboxCategory("Input")]
[Themable]
public class RadAutoCompleteBox : Control, IThemable, IPopupWrapperOwner, IAutocompleteInteraction, IDisposable, IWeakEventListener<NotifyCollectionChangedEventArgs>
Constructors
RadAutoCompleteBox()
Initializes a new instance of the RadAutoCompleteBox class.
Declaration
public RadAutoCompleteBox()
Fields
AutoCompleteModeProperty
Identifies the AutoCompleteMode dependency property.
Declaration
public static readonly DependencyProperty AutoCompleteModeProperty
Field Value
System.Windows.DependencyProperty
|
BoxesItemStyleProperty
Identifies the BoxesItemStyle dependency property.
Declaration
public static readonly DependencyProperty BoxesItemStyleProperty
Field Value
System.Windows.DependencyProperty
|
BoxesItemStyleSelectorProperty
Identifies the BoxesItemStyleSelector dependency property.
Declaration
public static readonly DependencyProperty BoxesItemStyleSelectorProperty
Field Value
System.Windows.DependencyProperty
|
BoxesItemTemplateProperty
Identifies the BoxesItemTemplate dependency property.
Declaration
public static readonly DependencyProperty BoxesItemTemplateProperty
Field Value
System.Windows.DependencyProperty
|
BoxesItemTemplateSelectorProperty
Identifies the BoxesItemTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty BoxesItemTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty
|
DisplayMemberPathProperty
Identifies the DisplayMemberPath dependency property.
Declaration
public static readonly DependencyProperty DisplayMemberPathProperty
Field Value
System.Windows.DependencyProperty
|
DropDownItemTemplateProperty
Identifies the DropDownItemTemplate dependency property.
Declaration
public static readonly DependencyProperty DropDownItemTemplateProperty
Field Value
System.Windows.DependencyProperty
|
DropDownItemTemplateSelectorProperty
Identifies the DropDownItemTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty DropDownItemTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty
|
DropDownPlacementProperty
Identifies the DropDownPlacement dependency property.
Declaration
public static readonly DependencyProperty DropDownPlacementProperty
Field Value
System.Windows.DependencyProperty
|
DropDownWidthProperty
Identifies the DropDownWidth dependency property.
Declaration
public static readonly DependencyProperty DropDownWidthProperty
Field Value
System.Windows.DependencyProperty
|
FilteredItemsProperty
Identifies the MaxDropDownWidthProperty dependency property.
Declaration
public static readonly DependencyProperty FilteredItemsProperty
Field Value
System.Windows.DependencyProperty
|
FilteringBehaviorProperty
Identifies the FilteringBehavior dependency property.
Declaration
public static readonly DependencyProperty FilteringBehaviorProperty
Field Value
System.Windows.DependencyProperty
|
HighlightBehaviorProperty
Identifies the HighlightBehavior dependency property.
Declaration
public static readonly DependencyProperty HighlightBehaviorProperty
Field Value
System.Windows.DependencyProperty
|
IsDropDownOpenProperty
Identifies the IsDropDownOpen dependency property.
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
System.Windows.DependencyProperty
|
IsHighlightedProperty
Identifies the IsHighlighted dependency property.
Declaration
public static readonly DependencyProperty IsHighlightedProperty
Field Value
System.Windows.DependencyProperty
|
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
System.Windows.DependencyProperty
|
MaxDropDownHeightProperty
Identifies the MaxDropDownHeight dependency property.
Declaration
public static readonly DependencyProperty MaxDropDownHeightProperty
Field Value
System.Windows.DependencyProperty
|
MaxDropDownWidthProperty
Identifies the MaxDropDownWidthProperty dependency property.
Declaration
public static readonly DependencyProperty MaxDropDownWidthProperty
Field Value
System.Windows.DependencyProperty
|
MinDropDownWidthProperty
Identifies the MinDropDownWidthProperty dependency property.
Declaration
public static readonly DependencyProperty MinDropDownWidthProperty
Field Value
System.Windows.DependencyProperty
|
NoResultsContentProperty
Identifies the NoResultsContent dependency property.
Declaration
public static readonly DependencyProperty NoResultsContentProperty
Field Value
System.Windows.DependencyProperty
|
NoResultsContentTemplateProperty
Identifies the NoResultsContentTemplate dependency property.
Declaration
public static readonly DependencyProperty NoResultsContentTemplateProperty
Field Value
System.Windows.DependencyProperty
|
SearchTextProperty
Identifies the MaxDropDownWidthProperty dependency property.
Declaration
public static readonly DependencyProperty SearchTextProperty
Field Value
System.Windows.DependencyProperty
|
SelectedItemProperty
Identifies the SelectedItem dependency property.
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
System.Windows.DependencyProperty
|
SelectedItemsProperty
Identifies the SelectedItems dependency property.
Declaration
public static readonly DependencyProperty SelectedItemsProperty
Field Value
System.Windows.DependencyProperty
|
SelectionChangedEvent
Occurs when the selection of a RadAutoCompleteBox changes.
Declaration
public static readonly RoutedEvent SelectionChangedEvent
Field Value
System.Windows.RoutedEvent
|
SelectionModeProperty
Identifies the SelectionMode dependency property.
Declaration
public static readonly DependencyProperty SelectionModeProperty
Field Value
System.Windows.DependencyProperty
|
TextBoxStyleProperty
Identifies the TextBoxStyle dependency property.
Declaration
public static readonly DependencyProperty TextBoxStyleProperty
Field Value
System.Windows.DependencyProperty
|
TextSearchModeProperty
Identifies the TextSearchMode dependency property.
Declaration
public static readonly DependencyProperty TextSearchModeProperty
Field Value
System.Windows.DependencyProperty
|
TextSearchPathProperty
Identifies the TextSearchPath dependency property.
Declaration
public static readonly DependencyProperty TextSearchPathProperty
Field Value
System.Windows.DependencyProperty
|
WatermarkContentProperty
Identifies the WatermarkContent dependency property.
Declaration
public static readonly DependencyProperty WatermarkContentProperty
Field Value
System.Windows.DependencyProperty
|
Properties
AutoCompleteMode
Specifies the autocomplete mode for the RadAutoCompleteBox. This is a dependency property.
Declaration
public AutoCompleteMode AutoCompleteMode { get; set; }
Property Value
AutoCompleteMode
|
BoxesItemStyle
Gets or sets the System.Windows.Style used to display each item into the boxes part of the control. This is a dependency property.
Declaration
public Style BoxesItemStyle { get; set; }
Property Value
System.Windows.Style
|
BoxesItemStyleSelector
Gets or sets the System.Windows.Controls.StyleSelector used to choose System.Windows.Style to display each item into the boxes part of the control. This is a dependency property.
Declaration
public StyleSelector BoxesItemStyleSelector { get; set; }
Property Value
System.Windows.Controls.StyleSelector
|
BoxesItemTemplate
Gets or sets the System.Windows.DataTemplate used to display each item into the boxes part of the control. This is a dependency property.
Declaration
public DataTemplate BoxesItemTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
BoxesItemTemplateSelector
Gets or sets the System.Windows.Controls.DataTemplateSelector used to choose System.Windows.DataTemplate to display each item into the boxes part of the control. This is a dependency property.
Declaration
public DataTemplateSelector BoxesItemTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector
|
DisplayMemberPath
The name or path of the property that is displayed for each the data item in the control. The default is an empty string (""). This is a dependency property.
Declaration
public string DisplayMemberPath { get; set; }
Property Value
System.String
|
DropDownItemTemplate
Gets or sets the System.Windows.DataTemplate used to display each item into the DropDown part of the control. This is a dependency property.
Declaration
public DataTemplate DropDownItemTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
DropDownItemTemplateSelector
Gets or sets the System.Windows.Controls.DataTemplateSelector used to choose System.Windows.DataTemplate to display each DropDown item into the dropdown part of the control. This is a dependency property.
Declaration
public DataTemplateSelector DropDownItemTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector
|
DropDownPlacement
Gets or sets value indicating where the DropDown part of the control will be placed. This is a dependency property.
Declaration
public AutoCompleteDropDownPlacement DropDownPlacement { get; set; }
Property Value
AutoCompleteDropDownPlacement
|
DropDownWidth
Gets or sets a GridLength that indicates what the RadAutoCompleteBox' DropDown width will be.
Declaration
public GridLength DropDownWidth { get; set; }
Property Value
System.Windows.GridLength
|
FilteredItems
Gets the currently filtered items into the RadAutoCompleteBox. This is a dependency property.
Declaration
public IEnumerable FilteredItems { get; }
Property Value
System.Collections.IEnumerable
|
FilteringBehavior
Gets or sets the FilteringBehavior of the RadAutoCompleteBox. This is a dependency property.
Declaration
public IFilteringBehavior FilteringBehavior { get; set; }
Property Value
IFilteringBehavior
|
HighlightBehavior
Gets or sets the HighlightBehavior of the RadAutoCompleteBox. This is a dependency property.
Declaration
public IHighlightBehavior HighlightBehavior { get; set; }
Property Value
IHighlightBehavior
|
HighlightedIndex
Gets or sets the currently highlighted index in the dropdown portion of the control.
Declaration
protected int HighlightedIndex { get; set; }
Property Value
System.Int32
|
IsDropDownOpen
Gets or sets the value that indicates whether the RadAutoCompleteBox dropdown is currently open. This is a dependency property.
Declaration
public bool IsDropDownOpen { get; set; }
Property Value
System.Boolean
|
IsHighlighted
Gets or sets a value indicating whether this instance is highlighted. This is a dependency property.
Declaration
public bool IsHighlighted { get; set; }
Property Value
System.Boolean
|
ItemsSource
Gets or sets a collection that is filtered when the user enters text. This is a dependency property.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
System.Collections.IEnumerable
|
MaxDropDownHeight
Gets or sets the maximum height for a RadAutoCompleteBox drop-down. This is a dependency property.
Declaration
public double MaxDropDownHeight { get; set; }
Property Value
System.Double
|
MaxDropDownWidth
Gets or sets the maximum width of a RadAutoCompleteBox drop-down. This is a dependency property.
Declaration
public double MaxDropDownWidth { get; set; }
Property Value
System.Double
|
MinDropDownWidth
Gets or sets the minimum width of a RadAutoCompleteBox drop-down. This is a dependency property.
Declaration
public double MinDropDownWidth { get; set; }
Property Value
System.Double
|
NoResultsContent
Gets or sets the content displayed in the dropdown if the filter result is empty.
Declaration
public object NoResultsContent { get; set; }
Property Value
System.Object
|
NoResultsContentTemplate
Gets or sets the System.Windows.DataTemplate used to display the content in the dropdown if the filter result is empty.
Declaration
public DataTemplate NoResultsContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
SearchText
Gets or sets the string that is into the TextBox part of the RadAutoCompleteBox. The SearchText value is used to filter the RadAutoCompleteBox' ItemsSource. This is a dependency property.
Declaration
public string SearchText { get; set; }
Property Value
System.String
|
SelectedItem
Gets or sets the first item in the current selection or returns null if the selection is empty. This is a dependency property.
Declaration
public object SelectedItem { get; set; }
Property Value
System.Object
|
SelectedItems
Gets or sets the list of currently selected items for the RadAutoCompleteBox. This is a dependency property.
Declaration
public IEnumerable SelectedItems { get; set; }
Property Value
System.Collections.IEnumerable
|
SelectionMode
Specifies the selection mode for the RadAutoCompleteBox. This is a dependency property.
Declaration
public AutoCompleteSelectionMode SelectionMode { get; set; }
Property Value
AutoCompleteSelectionMode
|
TextBoxStyle
Gets or sets the style of the RadWatermarkTextBox into the RadAutoCompleteBox. This is a dependency property.
Declaration
public Style TextBoxStyle { get; set; }
Property Value
System.Windows.Style
|
TextSearchMode
Specifies the text search mode for the RadAutoCompleteBox. This is a dependency property.
Declaration
public TextSearchMode TextSearchMode { get; set; }
Property Value
TextSearchMode
|
TextSearchPath
The name or path of the property that is used when filtering for each the data item in the control. The default is an empty string (""). This is a dependency property.
Declaration
public string TextSearchPath { get; set; }
Property Value
System.String
|
WatermarkContent
Gets or sets the content to be shown when the TextBox is not focused. When in Single SelectionMode, no item should be selected for the content to be visible. This is a dependency property.
Declaration
public object WatermarkContent { get; set; }
Property Value
System.Object
|
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
[Obsolete("The RadAutoCompleteBox control will no longer implement the IDisposable interface and this method will be removed in a future release.")]
public void Dispose()
Implements
GoToState(Boolean)
Updates the visual state of the control.
Declaration
protected void GoToState(bool useTransition)
Parameters
System.Boolean
useTransition
Indicates whether transition should be used. |
HandleKeyDown(Key)
Contains the keyboard navigation logic of RadAutoCompleteBox.
Declaration
protected virtual bool HandleKeyDown(Key systemKey)
Parameters
System.Windows.Input.Key
systemKey
The key that has been pressed. |
Returns
System.Boolean
True if the KeyDown event should be handled, otherwise false. |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnAutoCompleteModeChanged(AutoCompleteMode)
Called when the AutoCompleteMode property is changed.
Declaration
protected virtual void OnAutoCompleteModeChanged(AutoCompleteMode newValue)
Parameters
AutoCompleteMode
newValue
|
OnCreateAutomationPeer()
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
The type-specific System.Windows.Automation.Peers.AutomationPeer implementation. |
OnDisplayMemberPathChanged()
Called when the DisplayMemberPath property is changed.
Declaration
protected virtual void OnDisplayMemberPathChanged()
OnFilteringBehaviorChanged()
Called when the FilteringBehavior property is changed.
Declaration
protected virtual void OnFilteringBehaviorChanged()
OnGotFocus(RoutedEventArgs)
Called before the System.Windows.UIElement.GotFocus event occurs.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs
e
|
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Called before the System.Windows.UIElement.GotKeyboardFocus event occurs. Here the states of the AutoCompleteBox are updated. Added to work-around an issue with the Got and LostFocus events not getting fired.
Declaration
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
System.Windows.Input.KeyboardFocusChangedEventArgs
e
|
OnHighlightBehaviorChanged()
Called when the HighlightBehavior property is changed.
Declaration
protected virtual void OnHighlightBehaviorChanged()
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
OnIsDropDownOpenChanged(Boolean)
Called when the IsDropDownOpen property is changed.
Declaration
protected virtual void OnIsDropDownOpenChanged(bool isOpen)
Parameters
System.Boolean
isOpen
|
OnIsHighlightedChanged()
Called when the IsHighlighted property is changed.
Declaration
protected virtual void OnIsHighlightedChanged()
OnItemsSourceChanged(Object, Object)
Called when the ItemsSource property is changed.
Declaration
protected virtual void OnItemsSourceChanged(object newValue, object oldValue)
Parameters
System.Object
newValue
|
System.Object
oldValue
|
OnLostFocus(RoutedEventArgs)
Called before the System.Windows.UIElement.LostFocus event occurs.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs
e
|
OnMouseWheel(MouseWheelEventArgs)
Called before the System.Windows.UIElement.MouseWheel event occurs to provide handling for the event in a derived class without attaching a delegate.
Declaration
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters
System.Windows.Input.MouseWheelEventArgs
e
A System.Windows.Input.MouseWheelEventArgs that contains the event data. |
OnSelectedItemChanged(Object)
Called when the SelectedItem property is changed.
Declaration
protected virtual void OnSelectedItemChanged(object newValue)
Parameters
System.Object
newValue
|
OnSelectedItemsChanged(IEnumerable)
Called when the SelectedItems property is changed.
Declaration
protected virtual void OnSelectedItemsChanged(IEnumerable newValue)
Parameters
System.Collections.IEnumerable
newValue
|
OnSelectionChanged(SelectionChangedEventArgs)
Called when the selection changes.
Declaration
protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
System.Windows.Controls.SelectionChangedEventArgs
e
The event data. |
OnSelectionModeChanged(AutoCompleteSelectionMode)
Called when the SelectionMode property is changed.
Declaration
protected virtual void OnSelectionModeChanged(AutoCompleteSelectionMode newValue)
Parameters
AutoCompleteSelectionMode
newValue
|
OnTextBoxStyleChanged()
Called when the TextBoxStyle property is changed.
Declaration
protected virtual void OnTextBoxStyleChanged()
OnTextSearchModeChanged(TextSearchMode)
Called when the TextSearchMode property is changed.
Declaration
protected virtual void OnTextSearchModeChanged(TextSearchMode textSearchMode)
Parameters
TextSearchMode
textSearchMode
|
OnTextSearchPathChanged()
Called when the TextSearchPath property is changed.
Declaration
protected virtual void OnTextSearchPathChanged()
OnWatermarkContentChanged()
Called when the WatermarkContent property is changed.
Declaration
protected virtual void OnWatermarkContentChanged()
Populate(String)
Declaration
public void Populate(string searchText)
Parameters
System.String
searchText
|
Events
Populated
Occurs when the filtering of the RadAutoCompleteBox is finished and the FilteredItems are populated.
Declaration
public event EventHandler Populated
Event Type
System.EventHandler
|
Populating
Occurs before the RadAutoCompleteBox' items are filtered using the current SearchText.
Declaration
public event EventHandler<CancelRoutedEventArgs> Populating
Event Type
System.EventHandler<CancelRoutedEventArgs>
|
SearchTextChanged
Occurs when SearchText property changes.
Declaration
public event EventHandler SearchTextChanged
Event Type
System.EventHandler
|
SelectionChanged
Occurs when the selection of the RadAutoCompleteBox changes.
Declaration
public event SelectionChangedEventHandler SelectionChanged
Event Type
System.Windows.Controls.SelectionChangedEventHandler
|