ClassRadAutoSuggestBox
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")]
[SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")]
[SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
public class RadAutoSuggestBox : Control
Inheritance: objectRadAutoSuggestBox
Constructors
RadAutoSuggestBox()
Initializes a new instance of the RadAutoSuggestBox class.
Declaration
public RadAutoSuggestBox()
Fields
ClearButtonCommandProperty
Identifies the ClearButtonCommand dependency property.
Declaration
public static readonly DependencyProperty ClearButtonCommandProperty
Field Value
DependencyProperty
ClearButtonContentProperty
Identifies the ClearButtonContent dependency property.
Declaration
public static readonly DependencyProperty ClearButtonContentProperty
Field Value
DependencyProperty
ClearButtonContentTemplateProperty
Identifies the ClearButtonContentTemplate dependency property.
Declaration
public static readonly DependencyProperty ClearButtonContentTemplateProperty
Field Value
DependencyProperty
ClearButtonVisibilityProperty
Identifies the ClearButtonVisibility dependency property.
Declaration
public static readonly DependencyProperty ClearButtonVisibilityProperty
Field Value
DependencyProperty
DisplayMemberPathProperty
Identifies the DisplayMemberPath dependency property.
Declaration
public static readonly DependencyProperty DisplayMemberPathProperty
Field Value
DependencyProperty
GroupStyleSelectorProperty
Identifies the GroupStyleSelector dependency property.
Declaration
public static readonly DependencyProperty GroupStyleSelectorProperty
Field Value
DependencyProperty
IsDropDownOpenProperty
Identifies the IsDropDownOpen dependency property.
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
DependencyProperty
ItemContainerStyleProperty
Identifies the ItemContainerStyle dependency property.
Declaration
public static readonly DependencyProperty ItemContainerStyleProperty
Field Value
DependencyProperty
ItemContainerStyleSelectorProperty
Identifies the ItemContainerStyleSelector dependency property.
Declaration
public static readonly DependencyProperty ItemContainerStyleSelectorProperty
Field Value
DependencyProperty
ItemTemplateProperty
Identifies the ItemTemplate dependency property.
Declaration
public static readonly DependencyProperty ItemTemplateProperty
Field Value
DependencyProperty
ItemTemplateSelectorProperty
Identifies the ItemTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty ItemTemplateSelectorProperty
Field Value
DependencyProperty
ItemsPanelProperty
Identifies the ItemsPanel dependency property.
Declaration
public static readonly DependencyProperty ItemsPanelProperty
Field Value
DependencyProperty
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
DependencyProperty
MaxDropDownHeightProperty
Identifies the MaxDropDownHeight dependency property.
Declaration
public static readonly DependencyProperty MaxDropDownHeightProperty
Field Value
DependencyProperty
MaxDropDownWidthProperty
Identifies the MaxDropDownWidth dependency property.
Declaration
public static readonly DependencyProperty MaxDropDownWidthProperty
Field Value
DependencyProperty
MinDropDownWidthProperty
Identifies the MinDropDownWidth dependency property.
Declaration
public static readonly DependencyProperty MinDropDownWidthProperty
Field Value
DependencyProperty
NoResultsContentProperty
Identifies the NoResultsContent dependency property.
Declaration
public static readonly DependencyProperty NoResultsContentProperty
Field Value
DependencyProperty
NoResultsContentTemplateProperty
Identifies the NoResultsContentTemplate dependency property.
Declaration
public static readonly DependencyProperty NoResultsContentTemplateProperty
Field Value
DependencyProperty
QueryButtonCommandProperty
Identifies the QueryButtonCommand dependency property.
Declaration
public static readonly DependencyProperty QueryButtonCommandProperty
Field Value
DependencyProperty
QueryButtonContentProperty
Identifies the QueryButtonContent dependency property.
Declaration
public static readonly DependencyProperty QueryButtonContentProperty
Field Value
DependencyProperty
QueryButtonContentTemplateProperty
Identifies the QueryButtonContentTemplate dependency property.
Declaration
public static readonly DependencyProperty QueryButtonContentTemplateProperty
Field Value
DependencyProperty
QueryButtonVisibilityProperty
Identifies the QueryButtonVisibility dependency property.
Declaration
public static readonly DependencyProperty QueryButtonVisibilityProperty
Field Value
DependencyProperty
TextBoxStyleProperty
Identifies the TextBoxStyle dependency property.
Declaration
public static readonly DependencyProperty TextBoxStyleProperty
Field Value
DependencyProperty
TextMemberPathProperty
Identifies the TextMemberPath dependency property.
Declaration
public static readonly DependencyProperty TextMemberPathProperty
Field Value
DependencyProperty
TextProperty
Identifies the Text dependency property.
Declaration
public static readonly DependencyProperty TextProperty
Field Value
DependencyProperty
UpdateTextOnSuggestionChosenProperty
Identifies the UpdateTextOnSuggestionChosen dependency property.
Declaration
public static readonly DependencyProperty UpdateTextOnSuggestionChosenProperty
Field Value
DependencyProperty
WatermarkBehaviorProperty
Identifies the WatermarkBehavior dependency property.
Declaration
public static readonly DependencyProperty WatermarkBehaviorProperty
Field Value
DependencyProperty
WatermarkContentProperty
Identifies the WatermarkContent dependency property.
Declaration
public static readonly DependencyProperty WatermarkContentProperty
Field Value
DependencyProperty
WatermarkTemplateProperty
Identifies the WatermarkTemplate dependency property.
Declaration
public static readonly DependencyProperty WatermarkTemplateProperty
Field Value
DependencyProperty
Properties
ClearButtonCommand
Gets or sets the command of the clear button.
Declaration
public ICommand ClearButtonCommand { get; set; }
Property Value
ClearButtonContent
Gets or sets content of the clear button.
ClearButtonContentTemplate
Gets or sets the content template of the clear button.
Declaration
public DataTemplate ClearButtonContentTemplate { get; set; }
Property Value
DataTemplate
ClearButtonVisibility
Gets or sets the visibility mode of the clear button.
Declaration
public ClearButtonVisibility ClearButtonVisibility { get; set; }
Property Value
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.
GroupStyle
Gets the GroupStyle of the drop-down ListBox.
Declaration
public ObservableCollection<GroupStyle> GroupStyle { get; }
Property Value
ObservableCollection<GroupStyle>
GroupStyleSelector
Gets or sets the group style selector of the drop-down ListBox.
Declaration
public GroupStyleSelector GroupStyleSelector { get; set; }
Property Value
GroupStyleSelector
IsDropDownOpen
Gets or sets the value that indicates whether the RadAutoSuggestBox dropdown is currently open. This is a dependency property.
ItemContainerStyle
Gets or sets the ItemContainerStyle of the drop-down ListBox.
Declaration
public Style ItemContainerStyle { get; set; }
Property Value
Style
ItemContainerStyleSelector
Gets or sets the ItemContainerStyleSelector of the drop-down ListBox.
Declaration
public StyleSelector ItemContainerStyleSelector { get; set; }
Property Value
StyleSelector
ItemTemplate
Gets or sets the ItemTemplate of the drop-down ListBox.
Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
DataTemplate
ItemTemplateSelector
Gets or sets the ItemTemplateSelector of the drop-down ListBox.
Declaration
public DataTemplateSelector ItemTemplateSelector { get; set; }
Property Value
DataTemplateSelector
ItemsPanel
Gets or sets the ItemsPanel of the drop-down ListBox.
Declaration
public ItemsPanelTemplate ItemsPanel { get; set; }
Property Value
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
MaxDropDownHeight
Gets or sets the maximum height for the drop-down. This is a dependency property.
MaxDropDownWidth
Gets or sets the maximum width of the drop-down. This is a dependency property.
MinDropDownWidth
Gets or sets the minimum width of the drop-down. This is a dependency property.
NoResultsContent
Gets or sets the content displayed in the drop-down if the ItemsSource is empty.
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
DataTemplate
QueryButtonCommand
Gets or sets the command of the query button.
Declaration
public ICommand QueryButtonCommand { get; set; }
Property Value
QueryButtonContent
Gets or sets the content of the query button.
QueryButtonContentTemplate
Gets or sets the content template of the query button.
Declaration
public DataTemplate QueryButtonContentTemplate { get; set; }
Property Value
DataTemplate
QueryButtonVisibility
Gets or sets the visibility of the query button.
Declaration
public Visibility QueryButtonVisibility { get; set; }
Property Value
Visibility
Text
Gets or sets the search text.
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
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.
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
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
WatermarkContent
Gets or sets the content to be shown when the TextBox is empty. This is a dependency property.
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
DataTemplate
Methods
HandleKeyDown(Key)
Contains the keyboard navigation logic of RadAutoSuggestBox.
Declaration
protected virtual bool HandleKeyDown(Key key)
Parameters
key
Key
The key that has been pressed.
Returns
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 .
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
The type-specific AutomationPeer implementation.
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Called before the System.Windows.UIElement.GotKeyboardFocus event occurs.
Declaration
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
e
KeyboardFocusChangedEventArgs
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The 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.
OnSuggestionChosen(object)
Called when suggestion is chosen from the drop-down.
Declaration
protected virtual void OnSuggestionChosen(object suggestion)
Parameters
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
reason
The reason for changing the text.
Events
QuerySubmitted
Occurs when the user submits a search query.
Declaration
public event EventHandler<QuerySubmittedEventArgs> QuerySubmitted
Event Value
SuggestionChosen
Occurs when a suggestion is chosen from the drop-down of the control.
Declaration
public event EventHandler<SuggestionChosenEventArgs> SuggestionChosen
Event Value
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 Value