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.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
[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

cs-api-definition
public RadAutoSuggestBox()

Fields

ClearButtonCommandProperty

Identifies the ClearButtonCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ClearButtonCommandProperty

Field Value

DependencyProperty

ClearButtonContentProperty

Identifies the ClearButtonContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ClearButtonContentProperty

Field Value

DependencyProperty

ClearButtonContentTemplateProperty

Identifies the ClearButtonContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ClearButtonContentTemplateProperty

Field Value

DependencyProperty

ClearButtonVisibilityProperty

Identifies the ClearButtonVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ClearButtonVisibilityProperty

Field Value

DependencyProperty

DisplayMemberPathProperty

Identifies the DisplayMemberPath dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DisplayMemberPathProperty

Field Value

DependencyProperty

GroupStyleSelectorProperty

Identifies the GroupStyleSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupStyleSelectorProperty

Field Value

DependencyProperty

IsDropDownOpenProperty

Identifies the IsDropDownOpen dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsDropDownOpenProperty

Field Value

DependencyProperty

ItemContainerStyleProperty

Identifies the ItemContainerStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemContainerStyleProperty

Field Value

DependencyProperty

ItemContainerStyleSelectorProperty

Identifies the ItemContainerStyleSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemContainerStyleSelectorProperty

Field Value

DependencyProperty

ItemTemplateProperty

Identifies the ItemTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemTemplateProperty

Field Value

DependencyProperty

ItemTemplateSelectorProperty

Identifies the ItemTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemTemplateSelectorProperty

Field Value

DependencyProperty

ItemsPanelProperty

Identifies the ItemsPanel dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsPanelProperty

Field Value

DependencyProperty

ItemsSourceProperty

Identifies the ItemsSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsSourceProperty

Field Value

DependencyProperty

MaxDropDownHeightProperty

Identifies the MaxDropDownHeight dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MaxDropDownHeightProperty

Field Value

DependencyProperty

MaxDropDownWidthProperty

Identifies the MaxDropDownWidth dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MaxDropDownWidthProperty

Field Value

DependencyProperty

MinDropDownWidthProperty

Identifies the MinDropDownWidth dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MinDropDownWidthProperty

Field Value

DependencyProperty

NoResultsContentProperty

Identifies the NoResultsContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NoResultsContentProperty

Field Value

DependencyProperty

NoResultsContentTemplateProperty

Identifies the NoResultsContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NoResultsContentTemplateProperty

Field Value

DependencyProperty

QueryButtonCommandProperty

Identifies the QueryButtonCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty QueryButtonCommandProperty

Field Value

DependencyProperty

QueryButtonContentProperty

Identifies the QueryButtonContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty QueryButtonContentProperty

Field Value

DependencyProperty

QueryButtonContentTemplateProperty

Identifies the QueryButtonContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty QueryButtonContentTemplateProperty

Field Value

DependencyProperty

QueryButtonVisibilityProperty

Identifies the QueryButtonVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty QueryButtonVisibilityProperty

Field Value

DependencyProperty

TextBoxStyleProperty

Identifies the TextBoxStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TextBoxStyleProperty

Field Value

DependencyProperty

TextMemberPathProperty

Identifies the TextMemberPath dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TextMemberPathProperty

Field Value

DependencyProperty

TextProperty

Identifies the Text dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TextProperty

Field Value

DependencyProperty

UpdateTextOnSuggestionChosenProperty

Identifies the UpdateTextOnSuggestionChosen dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UpdateTextOnSuggestionChosenProperty

Field Value

DependencyProperty

WatermarkBehaviorProperty

Identifies the WatermarkBehavior dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty WatermarkBehaviorProperty

Field Value

DependencyProperty

WatermarkContentProperty

Identifies the WatermarkContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty WatermarkContentProperty

Field Value

DependencyProperty

WatermarkTemplateProperty

Identifies the WatermarkTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty WatermarkTemplateProperty

Field Value

DependencyProperty

Properties

ClearButtonCommand

Gets or sets the command of the clear button.

Declaration

cs-api-definition
public ICommand ClearButtonCommand { get; set; }

Property Value

ICommand

ClearButtonContent

Gets or sets content of the clear button.

Declaration

cs-api-definition
public object ClearButtonContent { get; set; }

Property Value

object

ClearButtonContentTemplate

Gets or sets the content template of the clear button.

Declaration

cs-api-definition
public DataTemplate ClearButtonContentTemplate { get; set; }

Property Value

DataTemplate

ClearButtonVisibility

Gets or sets the visibility mode of the clear button.

Declaration

cs-api-definition
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

cs-api-definition
public string DisplayMemberPath { get; set; }

Property Value

string

GroupStyle

Gets the GroupStyle of the drop-down ListBox.

Declaration

cs-api-definition
public ObservableCollection<GroupStyle> GroupStyle { get; }

Property Value

ObservableCollection<GroupStyle>

GroupStyleSelector

Gets or sets the group style selector of the drop-down ListBox.

Declaration

cs-api-definition
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.

Declaration

cs-api-definition
public bool IsDropDownOpen { get; set; }

Property Value

bool

ItemContainerStyle

Gets or sets the ItemContainerStyle of the drop-down ListBox.

Declaration

cs-api-definition
public Style ItemContainerStyle { get; set; }

Property Value

Style

ItemContainerStyleSelector

Gets or sets the ItemContainerStyleSelector of the drop-down ListBox.

Declaration

cs-api-definition
public StyleSelector ItemContainerStyleSelector { get; set; }

Property Value

StyleSelector

ItemTemplate

Gets or sets the ItemTemplate of the drop-down ListBox.

Declaration

cs-api-definition
public DataTemplate ItemTemplate { get; set; }

Property Value

DataTemplate

ItemTemplateSelector

Gets or sets the ItemTemplateSelector of the drop-down ListBox.

Declaration

cs-api-definition
public DataTemplateSelector ItemTemplateSelector { get; set; }

Property Value

DataTemplateSelector

ItemsPanel

Gets or sets the ItemsPanel of the drop-down ListBox.

Declaration

cs-api-definition
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

cs-api-definition
public IEnumerable ItemsSource { get; set; }

Property Value

IEnumerable

MaxDropDownHeight

Gets or sets the maximum height for the drop-down. This is a dependency property.

Declaration

cs-api-definition
public double MaxDropDownHeight { get; set; }

Property Value

double

MaxDropDownWidth

Gets or sets the maximum width of the drop-down. This is a dependency property.

Declaration

cs-api-definition
public double MaxDropDownWidth { get; set; }

Property Value

double

MinDropDownWidth

Gets or sets the minimum width of the drop-down. This is a dependency property.

Declaration

cs-api-definition
public double MinDropDownWidth { get; set; }

Property Value

double

NoResultsContent

Gets or sets the content displayed in the drop-down if the ItemsSource is empty.

Declaration

cs-api-definition
public object NoResultsContent { get; set; }

Property Value

object

NoResultsContentTemplate

Gets or sets the DataTemplate used to display the content in the dropdown if the ItemsSource is empty.

Declaration

cs-api-definition
public DataTemplate NoResultsContentTemplate { get; set; }

Property Value

DataTemplate

QueryButtonCommand

Gets or sets the command of the query button.

Declaration

cs-api-definition
public ICommand QueryButtonCommand { get; set; }

Property Value

ICommand

QueryButtonContent

Gets or sets the content of the query button.

Declaration

cs-api-definition
public object QueryButtonContent { get; set; }

Property Value

object

QueryButtonContentTemplate

Gets or sets the content template of the query button.

Declaration

cs-api-definition
public DataTemplate QueryButtonContentTemplate { get; set; }

Property Value

DataTemplate

QueryButtonVisibility

Gets or sets the visibility of the query button.

Declaration

cs-api-definition
public Visibility QueryButtonVisibility { get; set; }

Property Value

Visibility

Text

Gets or sets the search text.

Declaration

cs-api-definition
public string Text { get; set; }

Property Value

string

TextBoxStyle

Gets or sets the style of the RadWatermarkTextBox into the RadAutoSuggestBox. This is a dependency property.

Declaration

cs-api-definition
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.

Declaration

cs-api-definition
public string TextMemberPath { get; set; }

Property Value

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

cs-api-definition
public bool UpdateTextOnSuggestionChosen { get; set; }

Property Value

bool

WatermarkBehavior

Gets or sets a value that specifies when the watermark content of control will be hidden.

Declaration

cs-api-definition
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

cs-api-definition
public object WatermarkContent { get; set; }

Property Value

object

WatermarkTemplate

Gets or sets the template for presenting the content, shown when the TextBox is empty. This is a dependency property.

Declaration

cs-api-definition
public DataTemplate WatermarkTemplate { get; set; }

Property Value

DataTemplate

Methods

HandleKeyDown(Key)

Contains the keyboard navigation logic of RadAutoSuggestBox.

Declaration

cs-api-definition
protected virtual bool HandleKeyDown(Key key)

Parameters

key

Key

The key that has been pressed.

Returns

bool

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

cs-api-definition
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The type-specific AutomationPeer implementation.

OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)

Called before the System.Windows.UIElement.GotKeyboardFocus event occurs.

Declaration

cs-api-definition
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

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnIsDropDownOpenChanged()

Called when the IsDropDownOpen property is changed.

Declaration

cs-api-definition
protected virtual void OnIsDropDownOpenChanged()

OnQuerySubmitted(string, object)

Called when the user submits a search query.

Declaration

cs-api-definition
protected virtual void OnQuerySubmitted(string query, object suggestion)

Parameters

query

string

suggestion

object

OnSuggestionChosen(object)

Called when suggestion is chosen from the drop-down.

Declaration

cs-api-definition
protected virtual void OnSuggestionChosen(object suggestion)

Parameters

suggestion

object

OnTextBoxStyleChanged()

Called when the TextBoxStyle property is changed.

Declaration

cs-api-definition
protected virtual void OnTextBoxStyleChanged()

OnTextChanged(TextChangeReason)

Called when the text is changed - by user input, programmatically or via choosing a suggestion.

Declaration

cs-api-definition
protected virtual void OnTextChanged(TextChangeReason reason)

Parameters

reason

TextChangeReason

The reason for changing the text.

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

Events

QuerySubmitted

Occurs when the user submits a search query.

Declaration

cs-api-definition
public event EventHandler<QuerySubmittedEventArgs> QuerySubmitted

Event Value

EventHandler<QuerySubmittedEventArgs>

SuggestionChosen

Occurs when a suggestion is chosen from the drop-down of the control.

Declaration

cs-api-definition
public event EventHandler<SuggestionChosenEventArgs> SuggestionChosen

Event Value

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

cs-api-definition
public event EventHandler<TextChangedEventArgs> TextChanged

Event Value

EventHandler<TextChangedEventArgs>

In this article
DefinitionConstructorsRadAutoSuggestBox()FieldsClearButtonCommandPropertyClearButtonContentPropertyClearButtonContentTemplatePropertyClearButtonVisibilityPropertyDisplayMemberPathPropertyGroupStyleSelectorPropertyIsDropDownOpenPropertyItemContainerStylePropertyItemContainerStyleSelectorPropertyItemTemplatePropertyItemTemplateSelectorPropertyItemsPanelPropertyItemsSourcePropertyMaxDropDownHeightPropertyMaxDropDownWidthPropertyMinDropDownWidthPropertyNoResultsContentPropertyNoResultsContentTemplatePropertyQueryButtonCommandPropertyQueryButtonContentPropertyQueryButtonContentTemplatePropertyQueryButtonVisibilityPropertyTextBoxStylePropertyTextMemberPathPropertyTextPropertyUpdateTextOnSuggestionChosenPropertyWatermarkBehaviorPropertyWatermarkContentPropertyWatermarkTemplatePropertyPropertiesClearButtonCommandClearButtonContentClearButtonContentTemplateClearButtonVisibilityDisplayMemberPathGroupStyleGroupStyleSelectorIsDropDownOpenItemContainerStyleItemContainerStyleSelectorItemTemplateItemTemplateSelectorItemsPanelItemsSourceMaxDropDownHeightMaxDropDownWidthMinDropDownWidthNoResultsContentNoResultsContentTemplateQueryButtonCommandQueryButtonContentQueryButtonContentTemplateQueryButtonVisibilityTextTextBoxStyleTextMemberPathUpdateTextOnSuggestionChosenWatermarkBehaviorWatermarkContentWatermarkTemplateMethodsHandleKeyDown(Key)OnApplyTemplate()OnCreateAutomationPeer()OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)OnInitialized(EventArgs)OnIsDropDownOpenChanged()OnQuerySubmitted(string, object)OnSuggestionChosen(object)OnTextBoxStyleChanged()OnTextChanged(TextChangeReason)ResetTheme()EventsQuerySubmittedSuggestionChosenTextChanged
Not finding the help you need?
Contact Support