New to Telerik UI for WPFStart a free 30-day trial

Represents a combo box control that provides a drop-down list for selecting items, with support for advanced features such as filtering, autocomplete and custom templates.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

C#
[TelerikToolboxCategory("Input")]
public class RadComboBox : MultiSelector

Inheritance: objectRadComboBox

Derived Classes: DurationPickerRadRibbonComboBox

Constructors

Initializes a new instance of the RadComboBox class.

C#
public RadComboBox()

Fields

Identifies the AdditionalContentPositionProperty dependency property.

C#
public static readonly DependencyProperty AdditionalContentPositionProperty

AdditionalContentProperty

DependencyProperty

Identifies the AdditionalContentProperty dependency property.

C#
public static readonly DependencyProperty AdditionalContentProperty

Identifies the AdditionalContentTemplateProperty dependency property.

C#
public static readonly DependencyProperty AdditionalContentTemplateProperty

Identifies the AllowMultipleSelection dependency property.

C#
public static readonly DependencyProperty AllowMultipleSelectionProperty

Identifies the AutoCompleteSelectionModeProperty dependency property.

C#
public static readonly DependencyProperty AutoCompleteSelectionModeProperty

Identifies the CanAutocompleteSelectItems dependency property.

C#
public static readonly DependencyProperty CanAutocompleteSelectItemsProperty

Identifies the CanKeyboardNavigationSelectItems dependency property.

C#
public static readonly DependencyProperty CanKeyboardNavigationSelectItemsProperty

Identifies the ClearSelectionButtonContent dependency property.

C#
public static readonly DependencyProperty ClearSelectionButtonContentProperty

Identifies the learSelectionButtonVisibility dependency property.

C#
public static readonly DependencyProperty ClearSelectionButtonVisibilityProperty

CommandParameterProperty

DependencyProperty

Identifies the CommandParameter dependency property.

C#
public static readonly DependencyProperty CommandParameterProperty

CommandProperty

DependencyProperty

Identifies the Command dependency property.

C#
public static readonly DependencyProperty CommandProperty

CommandTargetProperty

DependencyProperty

Identifies the CommandParameter dependency property.

C#
public static readonly DependencyProperty CommandTargetProperty

Identifies the DropDownButtonIconContent dependency property.

C#
public static readonly DependencyProperty DropDownButtonIconContentProperty

Identifies the DropDownButtonIconTemplate dependency property.

C#
public static readonly DependencyProperty DropDownButtonIconTemplateProperty

DropDownWidthProperty

DependencyProperty

Identifies the DropDownWidth dependency property.

C#
public static readonly DependencyProperty DropDownWidthProperty

EditableTemplateProperty

DependencyProperty

Identifies the EditableTemplate dependency property.

C#
public static readonly DependencyProperty EditableTemplateProperty

Identifies the EmptySelectionBoxTemplate dependency property.

C#
public static readonly DependencyProperty EmptySelectionBoxTemplateProperty

EmptyTextProperty

DependencyProperty

Identifies the EmptyText dependency property.

C#
public static readonly DependencyProperty EmptyTextProperty

FilteringModeProperty

DependencyProperty

Identifies the FilteringMode dependency property.

C#
public static readonly DependencyProperty FilteringModeProperty

IsDropDownOpenProperty

DependencyProperty

Identifies the IsDropDownOpen dependency property.

C#
public static readonly DependencyProperty IsDropDownOpenProperty

Identifies the IsDropDownTabNavigationEnabled dependency property.

C#
public static readonly DependencyProperty IsDropDownTabNavigationEnabledProperty

IsEditableProperty

DependencyProperty

Identifies the IsEditable dependency property.

C#
public static readonly DependencyProperty IsEditableProperty

IsFilteringEnabledProperty

DependencyProperty

Identifies the FilteringMode dependency property.

C#
public static readonly DependencyProperty IsFilteringEnabledProperty

IsHighlightedProperty

DependencyProperty

Identifies the IsHighlighted dependency property.

C#
public static readonly DependencyProperty IsHighlightedProperty

IsMouseWheelEnabledProperty

DependencyProperty

Identifies the IsMouseWheelEnabledProperty dependency property.

C#
public static readonly DependencyProperty IsMouseWheelEnabledProperty

IsReadOnlyProperty

DependencyProperty

Identifies the IsReadOnly dependency property.

C#
public static readonly DependencyProperty IsReadOnlyProperty

IsWatermarkVisibleProperty

DependencyProperty

Identifies the IsWatermarkVisible dependency property.

C#
public static readonly DependencyProperty IsWatermarkVisibleProperty

MaxDropDownHeightProperty

DependencyProperty

Identifies the MaxDropDownHeight dependency property.

C#
public static readonly DependencyProperty MaxDropDownHeightProperty

MinDropDownWidthProperty

DependencyProperty

Identifies the MinDropDownWidth readonly dependency property.

C#
public static readonly DependencyProperty MinDropDownWidthProperty

Identifies the MultipleSelectionBoxTemplate dependency property.

C#
public static readonly DependencyProperty MultipleSelectionBoxTemplateProperty

Identifies the MultipleSelectionSeparator dependency property.

C#
public static readonly DependencyProperty MultipleSelectionSeparatorProperty

Identifies the MultipleSelectionSeparatorStringFormat dependency property.

C#
public static readonly DependencyProperty MultipleSelectionSeparatorStringFormatProperty

NonEditableTemplateProperty

DependencyProperty

Identifies the NonEditableTemplate dependency property.

C#
public static readonly DependencyProperty NonEditableTemplateProperty

OpenDropDownOnFocusProperty

DependencyProperty

Identifies the OpenDropDownOnFocus dependency property.

C#
public static readonly DependencyProperty OpenDropDownOnFocusProperty

SelectAllTextEventProperty

DependencyProperty

Identifies the SelectAllTextEvents dependency property.

C#
public static readonly DependencyProperty SelectAllTextEventProperty

SelectionBoxItemProperty

DependencyProperty

Identifies the SelectionBoxItem dependency property.

C#
public static readonly DependencyProperty SelectionBoxItemProperty

Identifies the SelectionBoxItemTemplate dependency property.

C#
public static readonly DependencyProperty SelectionBoxItemTemplateProperty

Identifies the SelectionBoxTemplate dependency property.

C#
public static readonly DependencyProperty SelectionBoxTemplateProperty

StaysOpenOnEditProperty

DependencyProperty

Identifies the StaysOpenOnEdit dependency property.

C#
public static readonly DependencyProperty StaysOpenOnEditProperty

TextBoxStyleProperty

DependencyProperty

Identifies the TextBoxStyle dependency property.

C#
public static readonly DependencyProperty TextBoxStyleProperty

TextProperty

DependencyProperty

Identifies the Text dependency property.

C#
public static readonly DependencyProperty TextProperty

TextSearchModeProperty

DependencyProperty

Identifies the FilteringMode dependency property.

C#
public static readonly DependencyProperty TextSearchModeProperty

Identifies the UpdateSelectionOnLostFocus dependency property.

C#
public static readonly DependencyProperty UpdateSelectionOnLostFocusProperty

Properties

Gets or sets the content for the additional content area.

C#
public object AdditionalContent { get; set; }

Gets or sets the position of the additional content area in the drop-down.

C#
public AdditionalContentPosition AdditionalContentPosition { get; set; }

Gets or sets the content template for the additional content area.

C#
public DataTemplate AdditionalContentTemplate { get; set; }

Gets or sets the value that indicates whether multiple item can be selected at the same time. This is a dependency property.

C#
public bool AllowMultipleSelection { get; set; }

Gets or sets the value indicating whether selection via autocomplete is performed when a partial or a full match is found.

C#
public ComboBoxAutoCompleteSelectionMode AutoCompleteSelectionMode { get; set; }
Property Value:

A ComboBoxAutoCompleteSelectionMode value that determines when the items matched via the autocomplete behavior are selected.

Remarks:

The following values are supported: FullMatch (items are selected only if they exactly match the typed text), and PartialMatch (items are selected even if they only partially match the typed text).

Gets or sets the value specifying whether typing a text in a RadComboBox should change the selection or not. This property is applicable only when the DropDown of the control is opened.

C#
public bool? CanAutocompleteSelectItems { get; set; }
Property Value:

True if the control should change its selection when the user types text. False when the selection should not be changed. Null when the default behavior should be used.

Gets or sets the value specifying whether the keyboard navigation in a RadComboBox should change the selection.

C#
public bool? CanKeyboardNavigationSelectItems { get; set; }
Property Value:

True if the control should change its selection when the user navigates with the keyboard. False when the selection should not be changed. Null when the default behavior should be used.

Gets or sets the content of the button clearing the selection. This is a dependency property.

C#
public object ClearSelectionButtonContent { get; set; }

Gets or sets the visibility of the button clearing the selection. This is a dependency property.

C#
public Visibility ClearSelectionButtonVisibility { get; set; }

Gets or sets the command that will be executed when the command source is invoked.

C#
[TypeConverter(typeof(CommandConverter))]
public ICommand Command { get; set; }

Represents a user defined data value that can be passed to the command when it is executed.

C#
public object CommandParameter { get; set; }

CommandTarget

IInputElement

The object that the command is being executed on.

C#
public IInputElement CommandTarget { get; set; }

Gets or sets the content displayed as the icon for the drop-down button.

C#
public object DropDownButtonIconContent { get; set; }

Gets or sets the content template for the drop-down button icon.

C#
public DataTemplate DropDownButtonIconTemplate { get; set; }

DropDownWidth

GridLength

Gets or sets the width of the DropDown of the RadComboBox.

C#
public GridLength DropDownWidth { get; set; }

EditableTemplate

ControlTemplate

Gets or sets the ControlTemplate for RadCombBox when its IsEditable property is true.

C#
public ControlTemplate EditableTemplate { get; set; }

Gets or sets the DataTemplate that should be applied on the selection box ContentPresenter when there is no selection. This is a dependency property.

C#
public DataTemplate EmptySelectionBoxTemplate { get; set; }

Gets or sets a string that should be displayed in the selection box ContentPresenter when there is no selection. This is a dependency property.

C#
public string EmptyText { get; set; }

Gets or sets the behavior which is used when filtering logic applies.

C#
public ComboBoxFilteringBehavior FilteringBehavior { get; set; }

Gets a value that indicates whether a control supports scrolling.

C#
protected override bool HandlesScrolling { get; }

Gets or sets the value that indicates whether the RadComboBox dropdown is currently open. This is a dependency property.

C#
public bool IsDropDownOpen { get; set; }

Gets or sets a value indicating whether tab navigation inside the drop down portion of control is enabled. The property takes effect only when the IsEditable property is false. This is a dependency property.

C#
public bool IsDropDownTabNavigationEnabled { get; set; }

Gets or sets a value that enables or disables editing of the text in text box of the RadComboBox. This is a dependency property.

C#
public bool IsEditable { get; set; }

Gets or sets the value indicating whether the filtering is enabled. This is a dependency property.

C#
public bool IsFilteringEnabled { get; set; }

Gets or sets a value indicating whether this instance is highlighted.

C#
public bool IsHighlighted { get; set; }
Remarks:

Set to true in the MouseEnter event and to false in the MouseLeave event.

Gets or sets the value indicating whether the instance will respond to MouseWheel events when the dropdown is not open.

C#
public bool IsMouseWheelEnabled { get; set; }

Gets or sets a value that enables selection-only mode, in which the contents of the RadComboBox are selectable but not editable. This is a dependency property.

C#
public bool IsReadOnly { get; set; }

Gets a value indicating whether the watermark of this instance is currently visible.

C#
public bool IsWatermarkVisible { get; }

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

C#
public double MaxDropDownHeight { get; set; }

Gets the minimum width of a RadComboBox drop-down. This is a readonly dependency property.

C#
public double MinDropDownWidth { get; }

Get or sets the DataTemplate to be used in multiple selection mode when the IsEditable property is false. This is a dependency property.

C#
public DataTemplate MultipleSelectionBoxTemplate { get; set; }

Get or sets the char separator used for separating the selected items.

C#
public char MultipleSelectionSeparator { get; set; }

Get or sets the char separator string form used for separating the selected items. This string format is removed while editing the text (when editable and focused).

C#
public string MultipleSelectionSeparatorStringFormat { get; set; }

NonEditableTemplate

ControlTemplate

Gets or sets the ControlTemplate for RadCombBox when its IsEditable property is false.

C#
public ControlTemplate NonEditableTemplate { get; set; }

Gets or sets a value that specifies whether the dropdown should be opened when the control gets the focus, or not. This is a dependency property.

C#
public bool OpenDropDownOnFocus { get; set; }

Gets or sets the value that specifies the name of the event that will select the text of the TextBox when IsEditable is true.

C#
public SelectAllTextEvents SelectAllTextEvent { get; set; }

Gets the item that is currently visible in the selection box ContentPresenter. This is a dependency property.

C#
public object SelectionBoxItem { get; }

Gets the DataTemplate that will be applied on the selection box ContentPresenter. This is a dependency property.

C#
public DataTemplate SelectionBoxItemTemplate { get; }

Gets or sets the DataTemplate that should be applied on the selection box ContentPresenter when there is a selected item. This is a dependency property.

C#
public DataTemplate SelectionBoxTemplate { get; set; }

Gets or sets whether a ComboBox that is open and displays a drop-down control will remain open when a user clicks the TextBox. Setting this property to true will take effect only if the IsEditable property is also true. This is a dependency property.

C#
public bool StaysOpenOnEdit { get; set; }

Gets or sets the text of the currently selected item. This is a dependency property.

C#
public string Text { get; set; }

Gets or sets the style of the TextBox element part of the RadComboBox. This is a dependency property.

C#
public Style TextBoxStyle { get; set; }

Gets or sets the current text input that the user entered when IsEditable=false or IsReadOnly=true.

C#
protected string TextInputString { get; set; }

Gets or sets the mode used for text search operations.

C#
public TextSearchMode TextSearchMode { get; set; }
Property Value:

A TextSearchMode that specifies how TextSearch will match items.

Remarks:

The following values are supported: StartsWith (matches items, which text starts with the search text), Contains (matches items, containing the search text), StartsWithCaseSensitive (matches items, which text starts with the search text, case sensitive), and ContainsCaseSensitive (matches items, containing the search text, case sensitive).

Gets or sets value indicating whether to update the selection only when the focus moved out of the control or Enter key is pressed. The property takes effect only when the IsEditable property is true and the AllowMultipleSelection is false. This is a dependency property.

C#
public bool UpdateSelectionOnLostFocus { get; set; }

Gets or sets a value that indicates if the Text of the control should be updated when the LostFocus event is raised. This is a dependency property.

C#
public bool UpdateTextOnLostFocus { get; set; }

Methods

Updates the visual state of the control.

C#
protected void ChangeVisualState(bool useTransitions)
Parameters:useTransitionsbool

Indicates whether transitions should be used.

When overridden in a derived class, undoes the effects of the method.

C#
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

The container element.

itemobject

The Item.

Creates or identifies the element that is used to display the given item.

C#
protected override DependencyObject GetContainerForItemOverride()
Returns:

DependencyObject

Contains the keyboard navigation logic of RadComboBox.

C#
protected virtual bool HandleKeyDown(Key systemKey, int platformKeyCode)
Parameters:systemKeyKey

The key that has been pressed.

platformKeyCodeint

The platform key code of the pressed key.

Returns:

bool

True if the KeyDown event should be handled, otherwise false.

Contains the text input logic of RadComboBox when the control is not editable. This method is called from a TextInput event handler.

C#
protected virtual bool HandleTextInput(string text)
Parameters:textstring

The text from the corresponding TextCompositionEventArgs.

Returns:

bool

True if the TextInput event should be handled, otherwise false.

Determines if the specified item is (or is eligible to be) its own container.

C#
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters:itemobject

The item to check.

Returns:

bool

True if the item is (or is eligible to be) its own container; otherwise, false.

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .

C#
public override void OnApplyTemplate()

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

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

The type-specific AutomationPeer implementation.

Raises the event.

C#
protected virtual void OnDropDownClosed(EventArgs e)
Parameters:eEventArgs

The EventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnDropDownOpened(EventArgs e)
Parameters:eEventArgs

The EventArgs instance containing the event data.

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Called when the IsDropDownOpen property is changed.

C#
protected virtual void OnIsDropDownOpenChanged(bool oldValue, bool newValue)
Parameters:oldValuebool

The old value of the IsDropDownOpen property.

newValuebool

The new value of the IsDropDownOpen property.

Called when the IsEditable property is changed.

C#
protected virtual void OnIsEditableChanged(bool oldValue, bool isEditable)
Parameters:oldValuebool

The old value of the IsEditable property.

isEditablebool

The new value of the IsEditable property.

Called when the property has changed.

C#
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
Parameters:eDependencyPropertyChangedEventArgs

The event data.

Called when the IsMouseWheelEnabled property is changed.

C#
protected virtual void OnIsMouseWheelEnabledChanged(bool oldValue, bool isEnabled)
Parameters:oldValuebool

The old value of the IsMouseWheelEnabled property.

isEnabledbool

The new value of the IsMouseWheelEnabled property.

Called before the event occurs to provide handling for the event in a derived class without attaching a delegate.

C#
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters:eMouseWheelEventArgs

A MouseWheelEventArgs that contains the event data.

Occurs when item at specific index is requested to be visible in the viewport.

C#
protected virtual void OnScrollIntoView(int itemIndex)
Parameters:itemIndexint

The index of the item to scroll to.

Called when the selection changes.

C#
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters:eSelectionChangedEventArgs

The event data.

Called when the TextBoxStyle property is changed.

C#
protected virtual void OnTextBoxStyleChanged()

Called when the Text property is changed.

C#
protected virtual void OnTextChanged(string oldValue, string newValue)
Parameters:oldValuestring

The old value of the Text property.

newValuestring

The new value of the Text property.

Invoked when the event is received.

C#
protected override void OnTextInput(TextCompositionEventArgs e)
Parameters:eTextCompositionEventArgs

Information about the event.

Prepares the specified element to display the specified item.

C#
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

Element used to display the specified item.

itemobject

Specified item.

Events

Occurs when the drop-down list of the combo box closes.

C#
public event EventHandler DropDownClosed

Occurs when the drop-down list of the combo box opens.

C#
public event EventHandler DropDownOpened
In this article
DefinitionConstructorsRadComboBox()FieldsAdditionalContentPositionPropertyAdditionalContentPropertyAdditionalContentTemplatePropertyAllowMultipleSelectionPropertyAutoCompleteSelectionModePropertyCanAutocompleteSelectItemsPropertyCanKeyboardNavigationSelectItemsPropertyClearSelectionButtonContentPropertyClearSelectionButtonVisibilityPropertyCommandParameterPropertyCommandPropertyCommandTargetPropertyDropDownButtonIconContentPropertyDropDownButtonIconTemplatePropertyDropDownWidthPropertyEditableTemplatePropertyEmptySelectionBoxTemplatePropertyEmptyTextPropertyFilteringModePropertyIsDropDownOpenPropertyIsDropDownTabNavigationEnabledPropertyIsEditablePropertyIsFilteringEnabledPropertyIsHighlightedPropertyIsMouseWheelEnabledPropertyIsReadOnlyPropertyIsWatermarkVisiblePropertyMaxDropDownHeightPropertyMinDropDownWidthPropertyMultipleSelectionBoxTemplatePropertyMultipleSelectionSeparatorPropertyMultipleSelectionSeparatorStringFormatPropertyNonEditableTemplatePropertyOpenDropDownOnFocusPropertySelectAllTextEventPropertySelectionBoxItemPropertySelectionBoxItemTemplatePropertySelectionBoxTemplatePropertyStaysOpenOnEditPropertyTextBoxStylePropertyTextPropertyTextSearchModePropertyUpdateSelectionOnLostFocusPropertyPropertiesAdditionalContentAdditionalContentPositionAdditionalContentTemplateAllowMultipleSelectionAutoCompleteSelectionModeCanAutocompleteSelectItemsCanKeyboardNavigationSelectItemsClearSelectionButtonContentClearSelectionButtonVisibilityCommandCommandParameterCommandTargetDropDownButtonIconContentDropDownButtonIconTemplateDropDownWidthEditableTemplateEmptySelectionBoxTemplateEmptyTextFilteringBehaviorHandlesScrollingIsDropDownOpenIsDropDownTabNavigationEnabledIsEditableIsFilteringEnabledIsHighlightedIsMouseWheelEnabledIsReadOnlyIsWatermarkVisibleMaxDropDownHeightMinDropDownWidthMultipleSelectionBoxTemplateMultipleSelectionSeparatorMultipleSelectionSeparatorStringFormatNonEditableTemplateOpenDropDownOnFocusSelectAllTextEventSelectionBoxItemSelectionBoxItemTemplateSelectionBoxTemplateStaysOpenOnEditTextTextBoxStyleTextInputStringTextSearchModeUpdateSelectionOnLostFocusUpdateTextOnLostFocusMethodsChangeVisualState(bool)ClearContainerForItemOverride(DependencyObject, object)GetContainerForItemOverride()HandleKeyDown(Key, int)HandleTextInput(string)IsItemItsOwnContainerOverride(object)OnApplyTemplate()OnCreateAutomationPeer()OnDropDownClosed(EventArgs)OnDropDownOpened(EventArgs)OnInitialized(EventArgs)OnIsDropDownOpenChanged(bool, bool)OnIsEditableChanged(bool, bool)OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)OnIsMouseWheelEnabledChanged(bool, bool)OnMouseWheel(MouseWheelEventArgs)OnScrollIntoView(int)OnSelectionChanged(SelectionChangedEventArgs)OnTextBoxStyleChanged()OnTextChanged(string, string)OnTextInput(TextCompositionEventArgs)PrepareContainerForItemOverride(DependencyObject, object)EventsDropDownClosedDropDownOpened
Not finding the help you need?
Contact Support