Class RadAutoSuggestBox
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.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Input.dll
Syntax
[TelerikToolboxCategory("Input")]
public class RadAutoSuggestBox : Control, IPopupWrapperOwner, IThemable
Constructors
RadAutoSuggestBox()
Fields
ClearButtonCommandProperty
Identifies the ClearButtonCommand dependency property.
Declaration
public static readonly DependencyProperty ClearButtonCommandProperty
Field Value
System.Windows.DependencyProperty
|
ClearButtonContentProperty
Identifies the ClearButtonContent dependency property.
Declaration
public static readonly DependencyProperty ClearButtonContentProperty
Field Value
System.Windows.DependencyProperty
|
ClearButtonContentTemplateProperty
Identifies the ClearButtonContentTemplate dependency property.
Declaration
public static readonly DependencyProperty ClearButtonContentTemplateProperty
Field Value
System.Windows.DependencyProperty
|
ClearButtonVisibilityProperty
Identifies the ClearButtonVisibility dependency property.
Declaration
public static readonly DependencyProperty ClearButtonVisibilityProperty
Field Value
System.Windows.DependencyProperty
|
DisplayMemberPathProperty
Identifies the DisplayMemberPath dependency property.
Declaration
public static readonly DependencyProperty DisplayMemberPathProperty
Field Value
System.Windows.DependencyProperty
|
GroupStyleSelectorProperty
Identifies the GroupStyleSelector dependency property.
Declaration
public static readonly DependencyProperty GroupStyleSelectorProperty
Field Value
System.Windows.DependencyProperty
|
IsDropDownOpenProperty
Identifies the IsDropDownOpen dependency property.
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
System.Windows.DependencyProperty
|
ItemContainerStyleProperty
Identifies the ItemContainerStyle dependency property.
Declaration
public static readonly DependencyProperty ItemContainerStyleProperty
Field Value
System.Windows.DependencyProperty
|
ItemContainerStyleSelectorProperty
Identifies the ItemContainerStyleSelector dependency property.
Declaration
public static readonly DependencyProperty ItemContainerStyleSelectorProperty
Field Value
System.Windows.DependencyProperty
|
ItemsPanelProperty
Identifies the ItemsPanel dependency property.
Declaration
public static readonly DependencyProperty ItemsPanelProperty
Field Value
System.Windows.DependencyProperty
|
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
System.Windows.DependencyProperty
|
ItemTemplateProperty
Identifies the ItemTemplate dependency property.
Declaration
public static readonly DependencyProperty ItemTemplateProperty
Field Value
System.Windows.DependencyProperty
|
ItemTemplateSelectorProperty
Identifies the ItemTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty ItemTemplateSelectorProperty
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 MaxDropDownWidth dependency property.
Declaration
public static readonly DependencyProperty MaxDropDownWidthProperty
Field Value
System.Windows.DependencyProperty
|
MinDropDownWidthProperty
Identifies the MinDropDownWidth 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
|
QueryButtonCommandProperty
Identifies the QueryButtonCommand dependency property.
Declaration
public static readonly DependencyProperty QueryButtonCommandProperty
Field Value
System.Windows.DependencyProperty
|
QueryButtonContentProperty
Identifies the QueryButtonContent dependency property.
Declaration
public static readonly DependencyProperty QueryButtonContentProperty
Field Value
System.Windows.DependencyProperty
|
QueryButtonContentTemplateProperty
Identifies the QueryButtonContentTemplate dependency property.
Declaration
public static readonly DependencyProperty QueryButtonContentTemplateProperty
Field Value
System.Windows.DependencyProperty
|
QueryButtonVisibilityProperty
Identifies the QueryButtonVisibility dependency property.
Declaration
public static readonly DependencyProperty QueryButtonVisibilityProperty
Field Value
System.Windows.DependencyProperty
|
TextBoxStyleProperty
Identifies the TextBoxStyle dependency property.
Declaration
public static readonly DependencyProperty TextBoxStyleProperty
Field Value
System.Windows.DependencyProperty
|
TextMemberPathProperty
Identifies the TextMemberPath dependency property.
Declaration
public static readonly DependencyProperty TextMemberPathProperty
Field Value
System.Windows.DependencyProperty
|
TextProperty
Identifies the Text dependency property.
Declaration
public static readonly DependencyProperty TextProperty
Field Value
System.Windows.DependencyProperty
|
UpdateTextOnSuggestionChosenProperty
Identifies the UpdateTextOnSuggestionChosen dependency property.
Declaration
public static readonly DependencyProperty UpdateTextOnSuggestionChosenProperty
Field Value
System.Windows.DependencyProperty
|
WatermarkBehaviorProperty
Identifies the WatermarkBehavior dependency property.
Declaration
public static readonly DependencyProperty WatermarkBehaviorProperty
Field Value
System.Windows.DependencyProperty
|
WatermarkContentProperty
Identifies the WatermarkContent dependency property.
Declaration
public static readonly DependencyProperty WatermarkContentProperty
Field Value
System.Windows.DependencyProperty
|
WatermarkTemplateProperty
Identifies the WatermarkTemplate dependency property.
Declaration
public static readonly DependencyProperty WatermarkTemplateProperty
Field Value
System.Windows.DependencyProperty
|
Properties
ClearButtonCommand
Gets or sets the command of the clear button.
Declaration
public ICommand ClearButtonCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
ClearButtonContent
Gets or sets content of the clear button.
Declaration
public object ClearButtonContent { get; set; }
Property Value
System.Object
|
ClearButtonContentTemplate
Gets or sets the content template of the clear button.
Declaration
public DataTemplate ClearButtonContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
ClearButtonVisibility
Gets or sets the visibility mode of the clear button.
Declaration
public ClearButtonVisibility ClearButtonVisibility { get; set; }
Property Value
ClearButtonVisibility
|
DisplayMemberPath
Gets or sets the property path that is used to get the value that is displayed for each data item in the drop-down of the control. The default is an empty string (""). This is a dependency property.
Declaration
public string DisplayMemberPath { get; set; }
Property Value
System.String
|
GroupStyle
Gets the GroupStyle of the drop-down ListBox.
Declaration
public ObservableCollection<GroupStyle> GroupStyle { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<System.Windows.Controls.GroupStyle>
|
GroupStyleSelector
Gets or sets the group style selector of the drop-down ListBox.
Declaration
public GroupStyleSelector GroupStyleSelector { get; set; }
Property Value
System.Windows.Controls.GroupStyleSelector
|
IsDropDownOpen
Gets or sets the value that indicates whether the RadAutoSuggestBox dropdown is currently open. This is a dependency property.
Declaration
public bool IsDropDownOpen { get; set; }
Property Value
System.Boolean
|
ItemContainerStyle
Gets or sets the ItemContainerStyle of the drop-down ListBox.
Declaration
public Style ItemContainerStyle { get; set; }
Property Value
System.Windows.Style
|
ItemContainerStyleSelector
Gets or sets the ItemContainerStyleSelector of the drop-down ListBox.
Declaration
public StyleSelector ItemContainerStyleSelector { get; set; }
Property Value
System.Windows.Controls.StyleSelector
|
ItemsPanel
Gets or sets the ItemsPanel of the drop-down ListBox.
Declaration
public ItemsPanelTemplate ItemsPanel { get; set; }
Property Value
System.Windows.Controls.ItemsPanelTemplate
|
ItemsSource
Gets or sets a collection that is shown in the drop-down. This is a dependency property.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
System.Collections.IEnumerable
|
ItemTemplate
Gets or sets the ItemTemplate of the drop-down ListBox.
Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
ItemTemplateSelector
Gets or sets the ItemTemplateSelector of the drop-down ListBox.
Declaration
public DataTemplateSelector ItemTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector
|
MaxDropDownHeight
Gets or sets the maximum height for the 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 the 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 the 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 drop-down if the ItemsSource is empty.
Declaration
public object NoResultsContent { get; set; }
Property Value
System.Object
|
NoResultsContentTemplate
Gets or sets the DataTemplate used to display the content in the dropdown if the ItemsSource is empty.
Declaration
public DataTemplate NoResultsContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
QueryButtonCommand
Gets or sets the command of the query button.
Declaration
public ICommand QueryButtonCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
QueryButtonContent
Gets or sets the content of the query button.
Declaration
public object QueryButtonContent { get; set; }
Property Value
System.Object
|
QueryButtonContentTemplate
Gets or sets the content template of the query button.
Declaration
public DataTemplate QueryButtonContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
QueryButtonVisibility
Gets or sets the visibility of the query button.
Declaration
public Visibility QueryButtonVisibility { get; set; }
Property Value
System.Windows.Visibility
|
Text
Gets or sets the search text.
Declaration
public string Text { get; set; }
Property Value
System.String
|
TextBoxStyle
Gets or sets the style of the RadWatermarkTextBox into the RadAutoSuggestBox. This is a dependency property.
Declaration
public Style TextBoxStyle { get; set; }
Property Value
System.Windows.Style
|
TextMemberPath
Gets or sets the property path that is used to get the value for display in the text box part of the control, when an item is chosen. This is a dependency property.
Declaration
public string TextMemberPath { get; set; }
Property Value
System.String
|
UpdateTextOnSuggestionChosen
Gets or sets a value indicating whether the chosen suggestion will trigger an update of the editable text part of RadAutoSuggestBox. This is a dependency property.
Declaration
public bool UpdateTextOnSuggestionChosen { get; set; }
Property Value
System.Boolean
|
WatermarkBehavior
Gets or sets a value that specifies when the watermark content of control will be hidden.
Declaration
public WatermarkBehavior WatermarkBehavior { get; set; }
Property Value
WatermarkBehavior
|
WatermarkContent
Gets or sets the content to be shown when the TextBox is empty. This is a dependency property.
Declaration
public object WatermarkContent { get; set; }
Property Value
System.Object
|
WatermarkTemplate
Gets or sets the template for presenting the content, shown when the TextBox is empty. This is a dependency property.
Declaration
public DataTemplate WatermarkTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
Methods
HandleKeyDown(Key)
Contains the keyboard navigation logic of RadAutoSuggestBox.
Declaration
protected virtual bool HandleKeyDown(Key key)
Parameters
System.Windows.Input.Key
key
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()
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. |
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Called before the System.Windows.UIElement.GotKeyboardFocus event occurs.
Declaration
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
System.Windows.Input.KeyboardFocusChangedEventArgs
e
|
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()
Called when the IsDropDownOpen property is changed.
Declaration
protected virtual void OnIsDropDownOpenChanged()
OnQuerySubmitted(String, Object)
Called when the user submits a search query.
Declaration
protected virtual void OnQuerySubmitted(string query, object suggestion)
Parameters
System.String
query
|
System.Object
suggestion
|
OnSuggestionChosen(Object)
Called when suggestion is chosen from the drop-down.
Declaration
protected virtual void OnSuggestionChosen(object suggestion)
Parameters
System.Object
suggestion
|
OnTextBoxStyleChanged()
Called when the TextBoxStyle property is changed.
Declaration
protected virtual void OnTextBoxStyleChanged()
OnTextChanged(TextChangeReason)
Called when the text is changed - by user input, programmatically or via choosing a suggestion.
Declaration
protected virtual void OnTextChanged(TextChangeReason reason)
Parameters
TextChangeReason
reason
The reason for changing the text. |
ResetTheme()
Resets the theme.
Declaration
public void ResetTheme()
Events
QuerySubmitted
Occurs when the user submits a search query.
Declaration
public event EventHandler<QuerySubmittedEventArgs> QuerySubmitted
Event Type
System.EventHandler<QuerySubmittedEventArgs>
|
SuggestionChosen
Occurs when a suggestion is chosen from the drop-down of the control.
Declaration
public event EventHandler<SuggestionChosenEventArgs> SuggestionChosen
Event Type
System.EventHandler<SuggestionChosenEventArgs>
|
TextChanged
Gets or sets the property path that is used to get the value for display in the text box part of the control, when an item is chosen. This is a dependency property. Occurs when the text is changed.
Declaration
public event EventHandler<TextChangedEventArgs> TextChanged
Event Type
System.EventHandler<TextChangedEventArgs>
|