RadComboBox
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:
[TelerikToolboxCategory("Input")]
public class RadComboBox : MultiSelector
Inheritance: objectRadComboBox
Derived Classes:
Constructors
Initializes a new instance of the RadComboBox class.
public RadComboBox()
Fields
AdditionalContentPositionProperty
DependencyProperty
Identifies the AdditionalContentPositionProperty dependency property.
public static readonly DependencyProperty AdditionalContentPositionProperty
AdditionalContentProperty
DependencyProperty
Identifies the AdditionalContentProperty dependency property.
public static readonly DependencyProperty AdditionalContentProperty
AdditionalContentTemplateProperty
DependencyProperty
Identifies the AdditionalContentTemplateProperty dependency property.
public static readonly DependencyProperty AdditionalContentTemplateProperty
AllowMultipleSelectionProperty
DependencyProperty
Identifies the AllowMultipleSelection dependency property.
public static readonly DependencyProperty AllowMultipleSelectionProperty
AutoCompleteSelectionModeProperty
DependencyProperty
Identifies the AutoCompleteSelectionModeProperty dependency property.
public static readonly DependencyProperty AutoCompleteSelectionModeProperty
CanAutocompleteSelectItemsProperty
DependencyProperty
Identifies the CanAutocompleteSelectItems dependency property.
public static readonly DependencyProperty CanAutocompleteSelectItemsProperty
CanKeyboardNavigationSelectItemsProperty
DependencyProperty
Identifies the CanKeyboardNavigationSelectItems dependency property.
public static readonly DependencyProperty CanKeyboardNavigationSelectItemsProperty
ClearSelectionButtonContentProperty
DependencyProperty
Identifies the ClearSelectionButtonContent dependency property.
public static readonly DependencyProperty ClearSelectionButtonContentProperty
ClearSelectionButtonVisibilityProperty
DependencyProperty
Identifies the learSelectionButtonVisibility dependency property.
public static readonly DependencyProperty ClearSelectionButtonVisibilityProperty
CommandParameterProperty
DependencyProperty
Identifies the CommandParameter dependency property.
public static readonly DependencyProperty CommandParameterProperty
CommandProperty
DependencyProperty
Identifies the Command dependency property.
public static readonly DependencyProperty CommandProperty
CommandTargetProperty
DependencyProperty
Identifies the CommandParameter dependency property.
public static readonly DependencyProperty CommandTargetProperty
DropDownButtonIconContentProperty
DependencyProperty
Identifies the DropDownButtonIconContent dependency property.
public static readonly DependencyProperty DropDownButtonIconContentProperty
DropDownButtonIconTemplateProperty
DependencyProperty
Identifies the DropDownButtonIconTemplate dependency property.
public static readonly DependencyProperty DropDownButtonIconTemplateProperty
DropDownWidthProperty
DependencyProperty
Identifies the DropDownWidth dependency property.
public static readonly DependencyProperty DropDownWidthProperty
EditableTemplateProperty
DependencyProperty
Identifies the EditableTemplate dependency property.
public static readonly DependencyProperty EditableTemplateProperty
EmptySelectionBoxTemplateProperty
DependencyProperty
Identifies the EmptySelectionBoxTemplate dependency property.
public static readonly DependencyProperty EmptySelectionBoxTemplateProperty
EmptyTextProperty
DependencyProperty
Identifies the EmptyText dependency property.
public static readonly DependencyProperty EmptyTextProperty
FilteringModeProperty
DependencyProperty
Identifies the FilteringMode dependency property.
public static readonly DependencyProperty FilteringModeProperty
IsDropDownOpenProperty
DependencyProperty
Identifies the IsDropDownOpen dependency property.
public static readonly DependencyProperty IsDropDownOpenProperty
IsDropDownTabNavigationEnabledProperty
DependencyProperty
Identifies the IsDropDownTabNavigationEnabled dependency property.
public static readonly DependencyProperty IsDropDownTabNavigationEnabledProperty
IsEditableProperty
DependencyProperty
Identifies the IsEditable dependency property.
public static readonly DependencyProperty IsEditableProperty
IsFilteringEnabledProperty
DependencyProperty
Identifies the FilteringMode dependency property.
public static readonly DependencyProperty IsFilteringEnabledProperty
IsHighlightedProperty
DependencyProperty
Identifies the IsHighlighted dependency property.
public static readonly DependencyProperty IsHighlightedProperty
IsMouseWheelEnabledProperty
DependencyProperty
Identifies the IsMouseWheelEnabledProperty dependency property.
public static readonly DependencyProperty IsMouseWheelEnabledProperty
IsReadOnlyProperty
DependencyProperty
Identifies the IsReadOnly dependency property.
public static readonly DependencyProperty IsReadOnlyProperty
IsWatermarkVisibleProperty
DependencyProperty
Identifies the IsWatermarkVisible dependency property.
public static readonly DependencyProperty IsWatermarkVisibleProperty
MaxDropDownHeightProperty
DependencyProperty
Identifies the MaxDropDownHeight dependency property.
public static readonly DependencyProperty MaxDropDownHeightProperty
MinDropDownWidthProperty
DependencyProperty
Identifies the MinDropDownWidth readonly dependency property.
public static readonly DependencyProperty MinDropDownWidthProperty
MultipleSelectionBoxTemplateProperty
DependencyProperty
Identifies the MultipleSelectionBoxTemplate dependency property.
public static readonly DependencyProperty MultipleSelectionBoxTemplateProperty
MultipleSelectionSeparatorProperty
DependencyProperty
Identifies the MultipleSelectionSeparator dependency property.
public static readonly DependencyProperty MultipleSelectionSeparatorProperty
MultipleSelectionSeparatorStringFormatProperty
DependencyProperty
Identifies the MultipleSelectionSeparatorStringFormat dependency property.
public static readonly DependencyProperty MultipleSelectionSeparatorStringFormatProperty
NonEditableTemplateProperty
DependencyProperty
Identifies the NonEditableTemplate dependency property.
public static readonly DependencyProperty NonEditableTemplateProperty
OpenDropDownOnFocusProperty
DependencyProperty
Identifies the OpenDropDownOnFocus dependency property.
public static readonly DependencyProperty OpenDropDownOnFocusProperty
SelectAllTextEventProperty
DependencyProperty
Identifies the SelectAllTextEvents dependency property.
public static readonly DependencyProperty SelectAllTextEventProperty
SelectionBoxItemProperty
DependencyProperty
Identifies the SelectionBoxItem dependency property.
public static readonly DependencyProperty SelectionBoxItemProperty
SelectionBoxItemTemplateProperty
DependencyProperty
Identifies the SelectionBoxItemTemplate dependency property.
public static readonly DependencyProperty SelectionBoxItemTemplateProperty
SelectionBoxTemplateProperty
DependencyProperty
Identifies the SelectionBoxTemplate dependency property.
public static readonly DependencyProperty SelectionBoxTemplateProperty
StaysOpenOnEditProperty
DependencyProperty
Identifies the StaysOpenOnEdit dependency property.
public static readonly DependencyProperty StaysOpenOnEditProperty
TextBoxStyleProperty
DependencyProperty
Identifies the TextBoxStyle dependency property.
public static readonly DependencyProperty TextBoxStyleProperty
TextProperty
DependencyProperty
Identifies the Text dependency property.
public static readonly DependencyProperty TextProperty
TextSearchModeProperty
DependencyProperty
Identifies the FilteringMode dependency property.
public static readonly DependencyProperty TextSearchModeProperty
UpdateSelectionOnLostFocusProperty
DependencyProperty
Identifies the UpdateSelectionOnLostFocus dependency property.
public static readonly DependencyProperty UpdateSelectionOnLostFocusProperty
Properties
Gets or sets the content for the additional content area.
public object AdditionalContent { get; set; }
Gets or sets the position of the additional content area in the drop-down.
public AdditionalContentPosition AdditionalContentPosition { get; set; }
AdditionalContentTemplate
DataTemplate
Gets or sets the content template for the additional content area.
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.
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.
public ComboBoxAutoCompleteSelectionMode AutoCompleteSelectionMode { get; set; }
A ComboBoxAutoCompleteSelectionMode value that determines when the items matched via the autocomplete behavior are selected.
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.
public bool? CanAutocompleteSelectItems { get; set; }
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.
public bool? CanKeyboardNavigationSelectItems { get; set; }
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.
public object ClearSelectionButtonContent { get; set; }
ClearSelectionButtonVisibility
Visibility
Gets or sets the visibility of the button clearing the selection. This is a dependency property.
public Visibility ClearSelectionButtonVisibility { get; set; }
Gets or sets the command that will be executed when the command source is invoked.
[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.
public object CommandParameter { get; set; }
CommandTarget
IInputElement
The object that the command is being executed on.
public IInputElement CommandTarget { get; set; }
Gets or sets the content displayed as the icon for the drop-down button.
public object DropDownButtonIconContent { get; set; }
DropDownButtonIconTemplate
DataTemplate
Gets or sets the content template for the drop-down button icon.
public DataTemplate DropDownButtonIconTemplate { get; set; }
DropDownWidth
GridLength
Gets or sets the width of the DropDown of the RadComboBox.
public GridLength DropDownWidth { get; set; }
EditableTemplate
ControlTemplate
Gets or sets the ControlTemplate for RadCombBox when its IsEditable property is true.
public ControlTemplate EditableTemplate { get; set; }
EmptySelectionBoxTemplate
DataTemplate
Gets or sets the DataTemplate that should be applied on the selection box ContentPresenter when there is no selection. This is a dependency property.
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.
public string EmptyText { get; set; }
Gets or sets the behavior which is used when filtering logic applies.
public ComboBoxFilteringBehavior FilteringBehavior { get; set; }
Gets a value that indicates whether a control supports scrolling.
protected override bool HandlesScrolling { get; }
Gets or sets the value that indicates whether the RadComboBox dropdown is currently open. This is a dependency property.
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.
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.
public bool IsEditable { get; set; }
Gets or sets the value indicating whether the filtering is enabled. This is a dependency property.
public bool IsFilteringEnabled { get; set; }
Gets or sets a value indicating whether this instance is highlighted.
public bool IsHighlighted { get; set; }
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.
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.
public bool IsReadOnly { get; set; }
Gets a value indicating whether the watermark of this instance is currently visible.
public bool IsWatermarkVisible { get; }
Gets or sets the maximum height for a RadComboBox drop-down. This is a dependency property.
public double MaxDropDownHeight { get; set; }
Gets the minimum width of a RadComboBox drop-down. This is a readonly dependency property.
public double MinDropDownWidth { get; }
MultipleSelectionBoxTemplate
DataTemplate
Get or sets the DataTemplate to be used in multiple selection mode when the IsEditable property is false. This is a dependency property.
public DataTemplate MultipleSelectionBoxTemplate { get; set; }
Get or sets the char separator used for separating the selected items.
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).
public string MultipleSelectionSeparatorStringFormat { get; set; }
NonEditableTemplate
ControlTemplate
Gets or sets the ControlTemplate for RadCombBox when its IsEditable property is false.
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.
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.
public SelectAllTextEvents SelectAllTextEvent { get; set; }
Gets the item that is currently visible in the selection box ContentPresenter. This is a dependency property.
public object SelectionBoxItem { get; }
SelectionBoxItemTemplate
DataTemplate
Gets the DataTemplate that will be applied on the selection box ContentPresenter. This is a dependency property.
public DataTemplate SelectionBoxItemTemplate { get; }
SelectionBoxTemplate
DataTemplate
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.
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.
public bool StaysOpenOnEdit { get; set; }
Gets or sets the text of the currently selected item. This is a dependency property.
public string Text { get; set; }
TextBoxStyle
Style
Gets or sets the style of the TextBox element part of the RadComboBox. This is a dependency property.
public Style TextBoxStyle { get; set; }
Gets or sets the current text input that the user entered when IsEditable=false or IsReadOnly=true.
protected string TextInputString { get; set; }
Gets or sets the mode used for text search operations.
public TextSearchMode TextSearchMode { get; set; }
A TextSearchMode that specifies how TextSearch will match items.
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.
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.
public bool UpdateTextOnLostFocus { get; set; }
Methods
Updates the visual state of the control.
protected void ChangeVisualState(bool useTransitions)
Indicates whether transitions should be used.
When overridden in a derived class, undoes the effects of the method.
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
The container element.
itemobjectThe Item.
GetContainerForItemOverride()
DependencyObject
Creates or identifies the element that is used to display the given item.
protected override DependencyObject GetContainerForItemOverride()
DependencyObject
Contains the keyboard navigation logic of RadComboBox.
Contains the text input logic of RadComboBox when the control is not editable. This method is called from a TextInput event handler.
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.
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 property has changed.
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
The event data.
Called before the event occurs to provide handling for the event in a derived class without attaching a delegate.
protected override void OnMouseWheel(MouseWheelEventArgs e)
A MouseWheelEventArgs that contains the event data.
Occurs when item at specific index is requested to be visible in the viewport.
protected virtual void OnScrollIntoView(int itemIndex)
The index of the item to scroll to.
Called when the selection changes.
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
The event data.
Called when the TextBoxStyle property is changed.
protected virtual void OnTextBoxStyleChanged()
Invoked when the event is received.
protected override void OnTextInput(TextCompositionEventArgs e)
Information about the event.
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Element used to display the specified item.
itemobjectSpecified item.
Events
Occurs when the drop-down list of the combo box closes.
public event EventHandler DropDownClosed
Occurs when the drop-down list of the combo box opens.
public event EventHandler DropDownOpened