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.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Input.dll
Syntax:
[TelerikToolboxCategory("Input")]
public class RadAutoSuggestBox : Control
Inheritance: objectRadAutoSuggestBox
Constructors
Initializes a new instance of the RadAutoSuggestBox class.
public RadAutoSuggestBox()
Fields
ClearButtonCommandProperty
DependencyProperty
Identifies the ClearButtonCommand dependency property.
public static readonly DependencyProperty ClearButtonCommandProperty
ClearButtonContentProperty
DependencyProperty
Identifies the ClearButtonContent dependency property.
public static readonly DependencyProperty ClearButtonContentProperty
ClearButtonContentTemplateProperty
DependencyProperty
Identifies the ClearButtonContentTemplate dependency property.
public static readonly DependencyProperty ClearButtonContentTemplateProperty
ClearButtonVisibilityProperty
DependencyProperty
Identifies the ClearButtonVisibility dependency property.
public static readonly DependencyProperty ClearButtonVisibilityProperty
DisplayMemberPathProperty
DependencyProperty
Identifies the DisplayMemberPath dependency property.
public static readonly DependencyProperty DisplayMemberPathProperty
GroupStyleSelectorProperty
DependencyProperty
Identifies the GroupStyleSelector dependency property.
public static readonly DependencyProperty GroupStyleSelectorProperty
IsDropDownOpenProperty
DependencyProperty
Identifies the IsDropDownOpen dependency property.
public static readonly DependencyProperty IsDropDownOpenProperty
ItemContainerStyleProperty
DependencyProperty
Identifies the ItemContainerStyle dependency property.
public static readonly DependencyProperty ItemContainerStyleProperty
ItemContainerStyleSelectorProperty
DependencyProperty
Identifies the ItemContainerStyleSelector dependency property.
public static readonly DependencyProperty ItemContainerStyleSelectorProperty
ItemsPanelProperty
DependencyProperty
Identifies the ItemsPanel dependency property.
public static readonly DependencyProperty ItemsPanelProperty
ItemsSourceProperty
DependencyProperty
Identifies the ItemsSource dependency property.
public static readonly DependencyProperty ItemsSourceProperty
ItemTemplateProperty
DependencyProperty
Identifies the ItemTemplate dependency property.
public static readonly DependencyProperty ItemTemplateProperty
ItemTemplateSelectorProperty
DependencyProperty
Identifies the ItemTemplateSelector dependency property.
public static readonly DependencyProperty ItemTemplateSelectorProperty
MaxDropDownHeightProperty
DependencyProperty
Identifies the MaxDropDownHeight dependency property.
public static readonly DependencyProperty MaxDropDownHeightProperty
MaxDropDownWidthProperty
DependencyProperty
Identifies the MaxDropDownWidth dependency property.
public static readonly DependencyProperty MaxDropDownWidthProperty
MinDropDownWidthProperty
DependencyProperty
Identifies the MinDropDownWidth dependency property.
public static readonly DependencyProperty MinDropDownWidthProperty
NoResultsContentProperty
DependencyProperty
Identifies the NoResultsContent dependency property.
public static readonly DependencyProperty NoResultsContentProperty
NoResultsContentTemplateProperty
DependencyProperty
Identifies the NoResultsContentTemplate dependency property.
public static readonly DependencyProperty NoResultsContentTemplateProperty
QueryButtonCommandProperty
DependencyProperty
Identifies the QueryButtonCommand dependency property.
public static readonly DependencyProperty QueryButtonCommandProperty
QueryButtonContentProperty
DependencyProperty
Identifies the QueryButtonContent dependency property.
public static readonly DependencyProperty QueryButtonContentProperty
QueryButtonContentTemplateProperty
DependencyProperty
Identifies the QueryButtonContentTemplate dependency property.
public static readonly DependencyProperty QueryButtonContentTemplateProperty
QueryButtonVisibilityProperty
DependencyProperty
Identifies the QueryButtonVisibility dependency property.
public static readonly DependencyProperty QueryButtonVisibilityProperty
TextBoxStyleProperty
DependencyProperty
Identifies the TextBoxStyle dependency property.
public static readonly DependencyProperty TextBoxStyleProperty
TextMemberPathProperty
DependencyProperty
Identifies the TextMemberPath dependency property.
public static readonly DependencyProperty TextMemberPathProperty
TextProperty
DependencyProperty
Identifies the Text dependency property.
public static readonly DependencyProperty TextProperty
UpdateTextOnSuggestionChosenProperty
DependencyProperty
Identifies the UpdateTextOnSuggestionChosen dependency property.
public static readonly DependencyProperty UpdateTextOnSuggestionChosenProperty
WatermarkBehaviorProperty
DependencyProperty
Identifies the WatermarkBehavior dependency property.
public static readonly DependencyProperty WatermarkBehaviorProperty
WatermarkContentProperty
DependencyProperty
Identifies the WatermarkContent dependency property.
public static readonly DependencyProperty WatermarkContentProperty
WatermarkTemplateProperty
DependencyProperty
Identifies the WatermarkTemplate dependency property.
public static readonly DependencyProperty WatermarkTemplateProperty
Properties
Gets or sets the command of the clear button.
public ICommand ClearButtonCommand { get; set; }
Gets or sets content of the clear button.
public object ClearButtonContent { get; set; }
ClearButtonContentTemplate
DataTemplate
Gets or sets the content template of the clear button.
public DataTemplate ClearButtonContentTemplate { get; set; }
Gets or sets the visibility mode of the clear button.
public ClearButtonVisibility ClearButtonVisibility { get; set; }
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.
public string DisplayMemberPath { get; set; }
GroupStyle
ObservableCollection<GroupStyle>
Gets the GroupStyle of the drop-down ListBox.
public ObservableCollection<GroupStyle> GroupStyle { get; }
GroupStyleSelector
GroupStyleSelector
Gets or sets the group style selector of the drop-down ListBox.
public GroupStyleSelector GroupStyleSelector { get; set; }
Gets or sets the value that indicates whether the RadAutoSuggestBox dropdown is currently open. This is a dependency property.
public bool IsDropDownOpen { get; set; }
ItemContainerStyle
Style
Gets or sets the ItemContainerStyle of the drop-down ListBox.
public Style ItemContainerStyle { get; set; }
ItemContainerStyleSelector
StyleSelector
Gets or sets the ItemContainerStyleSelector of the drop-down ListBox.
public StyleSelector ItemContainerStyleSelector { get; set; }
ItemsPanel
ItemsPanelTemplate
Gets or sets the ItemsPanel of the drop-down ListBox.
public ItemsPanelTemplate ItemsPanel { get; set; }
Gets or sets a collection that is shown in the drop-down. This is a dependency property.
public IEnumerable ItemsSource { get; set; }
ItemTemplate
DataTemplate
Gets or sets the ItemTemplate of the drop-down ListBox.
public DataTemplate ItemTemplate { get; set; }
ItemTemplateSelector
DataTemplateSelector
Gets or sets the ItemTemplateSelector of the drop-down ListBox.
public DataTemplateSelector ItemTemplateSelector { get; set; }
Gets or sets the maximum height for the drop-down. This is a dependency property.
public double MaxDropDownHeight { get; set; }
Gets or sets the maximum width of the drop-down. This is a dependency property.
public double MaxDropDownWidth { get; set; }
Gets or sets the minimum width of the drop-down. This is a dependency property.
public double MinDropDownWidth { get; set; }
Gets or sets the content displayed in the drop-down if the ItemsSource is empty.
public object NoResultsContent { get; set; }
NoResultsContentTemplate
DataTemplate
Gets or sets the DataTemplate used to display the content in the dropdown if the ItemsSource is empty.
public DataTemplate NoResultsContentTemplate { get; set; }
Gets or sets the command of the query button.
public ICommand QueryButtonCommand { get; set; }
Gets or sets the content of the query button.
public object QueryButtonContent { get; set; }
QueryButtonContentTemplate
DataTemplate
Gets or sets the content template of the query button.
public DataTemplate QueryButtonContentTemplate { get; set; }
QueryButtonVisibility
Visibility
Gets or sets the visibility of the query button.
public Visibility QueryButtonVisibility { get; set; }
TextBoxStyle
Style
Gets or sets the style of the RadWatermarkTextBox into the RadAutoSuggestBox. This is a dependency property.
public Style TextBoxStyle { get; set; }
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.
public string TextMemberPath { get; set; }
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.
public bool UpdateTextOnSuggestionChosen { get; set; }
Gets or sets a value that specifies when the watermark content of control will be hidden.
public WatermarkBehavior WatermarkBehavior { get; set; }
Gets or sets the content to be shown when the TextBox is empty. This is a dependency property.
public object WatermarkContent { get; set; }
WatermarkTemplate
DataTemplate
Gets or sets the template for presenting the content, shown when the TextBox is empty. This is a dependency property.
public DataTemplate WatermarkTemplate { get; set; }
Methods
Contains the keyboard navigation logic of RadAutoSuggestBox.
protected virtual bool HandleKeyDown(Key key)
The key that has been pressed.
Returns:True if the KeyDown event should be handled, otherwise false.
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
public override void OnApplyTemplate()
OnCreateAutomationPeer()
AutomationPeer
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
The type-specific AutomationPeer implementation.
Called before the System.Windows.UIElement.GotKeyboardFocus event occurs.
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Called when the IsDropDownOpen property is changed.
protected virtual void OnIsDropDownOpenChanged()
Called when suggestion is chosen from the drop-down.
Called when the TextBoxStyle property is changed.
protected virtual void OnTextBoxStyleChanged()
Called when the text is changed - by user input, programmatically or via choosing a suggestion.
protected virtual void OnTextChanged(TextChangeReason reason)
The reason for changing the text.
Resets the theme.
public void ResetTheme()
Events
Occurs when the user submits a search query.
public event EventHandler<QuerySubmittedEventArgs> QuerySubmitted
Occurs when a suggestion is chosen from the drop-down of the control.
public event EventHandler<SuggestionChosenEventArgs> SuggestionChosen
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.
public event EventHandler<TextChangedEventArgs> TextChanged