ClassRadComboBox
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:
[SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")]
[SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
[TelerikToolboxCategory("Input")]
public class RadComboBox : MultiSelector
Inheritance: objectRadComboBox
Derived Classes:
Constructors
RadComboBox()
Initializes a new instance of the RadComboBox class.
Declaration
public RadComboBox()
Fields
AdditionalContentPositionProperty
Identifies the AdditionalContentPositionProperty dependency property.
Declaration
public static readonly DependencyProperty AdditionalContentPositionProperty
Field Value
DependencyProperty
AdditionalContentProperty
Identifies the AdditionalContentProperty dependency property.
Declaration
public static readonly DependencyProperty AdditionalContentProperty
Field Value
DependencyProperty
AdditionalContentTemplateProperty
Identifies the AdditionalContentTemplateProperty dependency property.
Declaration
public static readonly DependencyProperty AdditionalContentTemplateProperty
Field Value
DependencyProperty
AllowMultipleSelectionProperty
Identifies the AllowMultipleSelection dependency property.
Declaration
public static readonly DependencyProperty AllowMultipleSelectionProperty
Field Value
DependencyProperty
AutoCompleteSelectionModeProperty
Identifies the AutoCompleteSelectionModeProperty dependency property.
Declaration
public static readonly DependencyProperty AutoCompleteSelectionModeProperty
Field Value
DependencyProperty
CanAutocompleteSelectItemsProperty
Identifies the CanAutocompleteSelectItems dependency property.
Declaration
public static readonly DependencyProperty CanAutocompleteSelectItemsProperty
Field Value
DependencyProperty
CanKeyboardNavigationSelectItemsProperty
Identifies the CanKeyboardNavigationSelectItems dependency property.
Declaration
public static readonly DependencyProperty CanKeyboardNavigationSelectItemsProperty
Field Value
DependencyProperty
ClearSelectionButtonContentProperty
Identifies the ClearSelectionButtonContent dependency property.
Declaration
public static readonly DependencyProperty ClearSelectionButtonContentProperty
Field Value
DependencyProperty
ClearSelectionButtonVisibilityProperty
Identifies the learSelectionButtonVisibility dependency property.
Declaration
public static readonly DependencyProperty ClearSelectionButtonVisibilityProperty
Field Value
DependencyProperty
CommandParameterProperty
Identifies the CommandParameter dependency property.
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
DependencyProperty
CommandProperty
Identifies the Command dependency property.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
DependencyProperty
CommandTargetProperty
Identifies the CommandParameter dependency property.
Declaration
public static readonly DependencyProperty CommandTargetProperty
Field Value
DependencyProperty
DropDownButtonIconContentProperty
Identifies the DropDownButtonIconContent dependency property.
Declaration
public static readonly DependencyProperty DropDownButtonIconContentProperty
Field Value
DependencyProperty
DropDownButtonIconTemplateProperty
Identifies the DropDownButtonIconTemplate dependency property.
Declaration
public static readonly DependencyProperty DropDownButtonIconTemplateProperty
Field Value
DependencyProperty
DropDownWidthProperty
Identifies the DropDownWidth dependency property.
Declaration
public static readonly DependencyProperty DropDownWidthProperty
Field Value
DependencyProperty
EditableTemplateProperty
Identifies the EditableTemplate dependency property.
Declaration
public static readonly DependencyProperty EditableTemplateProperty
Field Value
DependencyProperty
EmptySelectionBoxTemplateProperty
Identifies the EmptySelectionBoxTemplate dependency property.
Declaration
public static readonly DependencyProperty EmptySelectionBoxTemplateProperty
Field Value
DependencyProperty
EmptyTextProperty
Identifies the EmptyText dependency property.
Declaration
public static readonly DependencyProperty EmptyTextProperty
Field Value
DependencyProperty
FilteringModeProperty
Identifies the FilteringMode dependency property.
Declaration
public static readonly DependencyProperty FilteringModeProperty
Field Value
DependencyProperty
IsDropDownOpenProperty
Identifies the IsDropDownOpen dependency property.
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
DependencyProperty
IsDropDownTabNavigationEnabledProperty
Identifies the IsDropDownTabNavigationEnabled dependency property.
Declaration
public static readonly DependencyProperty IsDropDownTabNavigationEnabledProperty
Field Value
DependencyProperty
IsEditableProperty
Identifies the IsEditable dependency property.
Declaration
public static readonly DependencyProperty IsEditableProperty
Field Value
DependencyProperty
IsFilteringEnabledProperty
Identifies the FilteringMode dependency property.
Declaration
public static readonly DependencyProperty IsFilteringEnabledProperty
Field Value
DependencyProperty
IsHighlightedProperty
Identifies the IsHighlighted dependency property.
Declaration
public static readonly DependencyProperty IsHighlightedProperty
Field Value
DependencyProperty
IsMouseWheelEnabledProperty
Identifies the IsMouseWheelEnabledProperty dependency property.
Declaration
public static readonly DependencyProperty IsMouseWheelEnabledProperty
Field Value
DependencyProperty
IsReadOnlyProperty
Identifies the IsReadOnly dependency property.
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
DependencyProperty
IsWatermarkVisibleProperty
Identifies the IsWatermarkVisible dependency property.
Declaration
public static readonly DependencyProperty IsWatermarkVisibleProperty
Field Value
DependencyProperty
MaxDropDownHeightProperty
Identifies the MaxDropDownHeight dependency property.
Declaration
public static readonly DependencyProperty MaxDropDownHeightProperty
Field Value
DependencyProperty
MinDropDownWidthProperty
Identifies the MinDropDownWidth readonly dependency property.
Declaration
public static readonly DependencyProperty MinDropDownWidthProperty
Field Value
DependencyProperty
MultipleSelectionBoxTemplateProperty
Identifies the MultipleSelectionBoxTemplate dependency property.
Declaration
public static readonly DependencyProperty MultipleSelectionBoxTemplateProperty
Field Value
DependencyProperty
MultipleSelectionSeparatorProperty
Identifies the MultipleSelectionSeparator dependency property.
Declaration
public static readonly DependencyProperty MultipleSelectionSeparatorProperty
Field Value
DependencyProperty
MultipleSelectionSeparatorStringFormatProperty
Identifies the MultipleSelectionSeparatorStringFormat dependency property.
Declaration
public static readonly DependencyProperty MultipleSelectionSeparatorStringFormatProperty
Field Value
DependencyProperty
NonEditableTemplateProperty
Identifies the NonEditableTemplate dependency property.
Declaration
public static readonly DependencyProperty NonEditableTemplateProperty
Field Value
DependencyProperty
OpenDropDownOnFocusProperty
Identifies the OpenDropDownOnFocus dependency property.
Declaration
public static readonly DependencyProperty OpenDropDownOnFocusProperty
Field Value
DependencyProperty
SelectAllTextEventProperty
Identifies the SelectAllTextEvents dependency property.
Declaration
public static readonly DependencyProperty SelectAllTextEventProperty
Field Value
DependencyProperty
SelectionBoxItemProperty
Identifies the SelectionBoxItem dependency property.
Declaration
public static readonly DependencyProperty SelectionBoxItemProperty
Field Value
DependencyProperty
SelectionBoxItemTemplateProperty
Identifies the SelectionBoxItemTemplate dependency property.
Declaration
public static readonly DependencyProperty SelectionBoxItemTemplateProperty
Field Value
DependencyProperty
SelectionBoxTemplateProperty
Identifies the SelectionBoxTemplate dependency property.
Declaration
public static readonly DependencyProperty SelectionBoxTemplateProperty
Field Value
DependencyProperty
StaysOpenOnEditProperty
Identifies the StaysOpenOnEdit dependency property.
Declaration
public static readonly DependencyProperty StaysOpenOnEditProperty
Field Value
DependencyProperty
TextBoxStyleProperty
Identifies the TextBoxStyle dependency property.
Declaration
public static readonly DependencyProperty TextBoxStyleProperty
Field Value
DependencyProperty
TextProperty
Identifies the Text dependency property.
Declaration
public static readonly DependencyProperty TextProperty
Field Value
DependencyProperty
TextSearchModeProperty
Identifies the FilteringMode dependency property.
Declaration
public static readonly DependencyProperty TextSearchModeProperty
Field Value
DependencyProperty
UpdateSelectionOnLostFocusProperty
Identifies the UpdateSelectionOnLostFocus dependency property.
Declaration
public static readonly DependencyProperty UpdateSelectionOnLostFocusProperty
Field Value
DependencyProperty
Properties
AdditionalContent
Gets or sets the content for the additional content area.
AdditionalContentPosition
Gets or sets the position of the additional content area in the drop-down.
Declaration
public AdditionalContentPosition AdditionalContentPosition { get; set; }
Property Value
AdditionalContentTemplate
Gets or sets the content template for the additional content area.
Declaration
public DataTemplate AdditionalContentTemplate { get; set; }
Property Value
DataTemplate
AllowMultipleSelection
Gets or sets the value that indicates whether multiple item can be selected at the same time. This is a dependency property.
AutoCompleteSelectionMode
Gets or sets the value indicating whether selection via autocomplete is performed when a partial or a full match is found.
Declaration
public ComboBoxAutoCompleteSelectionMode AutoCompleteSelectionMode { get; set; }
Property Value
ComboBoxAutoCompleteSelectionMode
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).
CanAutocompleteSelectItems
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.
Declaration
public bool? CanAutocompleteSelectItems { get; set; }
Property Value
bool?
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.
CanKeyboardNavigationSelectItems
Gets or sets the value specifying whether the keyboard navigation in a RadComboBox should change the selection.
Declaration
public bool? CanKeyboardNavigationSelectItems { get; set; }
Property Value
bool?
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.
ClearSelectionButtonContent
Gets or sets the content of the button clearing the selection. This is a dependency property.
Declaration
public object ClearSelectionButtonContent { get; set; }
Property Value
ClearSelectionButtonVisibility
Gets or sets the visibility of the button clearing the selection. This is a dependency property.
Declaration
public Visibility ClearSelectionButtonVisibility { get; set; }
Property Value
Visibility
Command
Gets or sets the command that will be executed when the command source is invoked.
Declaration
[TypeConverter(typeof(CommandConverter))]
public ICommand Command { get; set; }
Property Value
CommandParameter
Represents a user defined data value that can be passed to the command when it is executed.
CommandTarget
The object that the command is being executed on.
Declaration
public IInputElement CommandTarget { get; set; }
Property Value
IInputElement
DropDownButtonIconContent
Gets or sets the content displayed as the icon for the drop-down button.
Declaration
public object DropDownButtonIconContent { get; set; }
Property Value
DropDownButtonIconTemplate
Gets or sets the content template for the drop-down button icon.
Declaration
public DataTemplate DropDownButtonIconTemplate { get; set; }
Property Value
DataTemplate
DropDownWidth
Gets or sets the width of the DropDown of the RadComboBox.
Declaration
public GridLength DropDownWidth { get; set; }
Property Value
GridLength
EditableTemplate
Gets or sets the ControlTemplate for RadCombBox when its IsEditable property is true.
Declaration
public ControlTemplate EditableTemplate { get; set; }
Property Value
ControlTemplate
EmptySelectionBoxTemplate
Gets or sets the DataTemplate that should be applied on the selection box ContentPresenter when there is no selection. This is a dependency property.
Declaration
public DataTemplate EmptySelectionBoxTemplate { get; set; }
Property Value
DataTemplate
EmptyText
Gets or sets a string that should be displayed in the selection box ContentPresenter when there is no selection. This is a dependency property.
FilteringBehavior
Gets or sets the behavior which is used when filtering logic applies.
Declaration
public ComboBoxFilteringBehavior FilteringBehavior { get; set; }
Property Value
HandlesScrolling
Gets a value that indicates whether a control supports scrolling.
IsDropDownOpen
Gets or sets the value that indicates whether the RadComboBox dropdown is currently open. This is a dependency property.
IsDropDownTabNavigationEnabled
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.
Declaration
public bool IsDropDownTabNavigationEnabled { get; set; }
Property Value
IsEditable
Gets or sets a value that enables or disables editing of the text in text box of the RadComboBox. This is a dependency property.
IsFilteringEnabled
Gets or sets the value indicating whether the filtering is enabled. This is a dependency property.
IsHighlighted
Gets or sets a value indicating whether this instance is highlighted.
Declaration
public bool IsHighlighted { get; set; }
Property Value
Remarks
Set to true in the MouseEnter event and to false in the MouseLeave event.
IsMouseWheelEnabled
Gets or sets the value indicating whether the instance will respond to MouseWheel events when the dropdown is not open.
IsReadOnly
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.
IsWatermarkVisible
Gets a value indicating whether the watermark of this instance is currently visible.
MaxDropDownHeight
Gets or sets the maximum height for a RadComboBox drop-down. This is a dependency property.
MinDropDownWidth
Gets the minimum width of a RadComboBox drop-down. This is a readonly dependency property.
MultipleSelectionBoxTemplate
Get or sets the DataTemplate to be used in multiple selection mode when the IsEditable property is false. This is a dependency property.
Declaration
public DataTemplate MultipleSelectionBoxTemplate { get; set; }
Property Value
DataTemplate
MultipleSelectionSeparator
Get or sets the char separator used for separating the selected items.
Declaration
public char MultipleSelectionSeparator { get; set; }
Property Value
MultipleSelectionSeparatorStringFormat
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).
Declaration
public string MultipleSelectionSeparatorStringFormat { get; set; }
Property Value
NonEditableTemplate
Gets or sets the ControlTemplate for RadCombBox when its IsEditable property is false.
Declaration
public ControlTemplate NonEditableTemplate { get; set; }
Property Value
ControlTemplate
OpenDropDownOnFocus
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.
SelectAllTextEvent
Gets or sets the value that specifies the name of the event that will select the text of the TextBox when IsEditable is true.
Declaration
public SelectAllTextEvents SelectAllTextEvent { get; set; }
Property Value
SelectionBoxItem
Gets the item that is currently visible in the selection box ContentPresenter. This is a dependency property.
SelectionBoxItemTemplate
Gets the DataTemplate that will be applied on the selection box ContentPresenter. This is a dependency property.
Declaration
public DataTemplate SelectionBoxItemTemplate { get; }
Property Value
DataTemplate
SelectionBoxTemplate
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.
Declaration
public DataTemplate SelectionBoxTemplate { get; set; }
Property Value
DataTemplate
StaysOpenOnEdit
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.
Text
Gets or sets the text of the currently selected item. This is a dependency property.
TextBoxStyle
Gets or sets the style of the TextBox element part of the RadComboBox. This is a dependency property.
Declaration
public Style TextBoxStyle { get; set; }
Property Value
Style
TextInputString
Gets or sets the current text input that the user entered when IsEditable=false or IsReadOnly=true.
TextSearchMode
Gets or sets the mode used for text search operations.
Declaration
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).
UpdateSelectionOnLostFocus
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.
Declaration
public bool UpdateSelectionOnLostFocus { get; set; }
Property Value
UpdateTextOnLostFocus
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.
Methods
ChangeVisualState(bool)
Updates the visual state of the control.
Declaration
protected void ChangeVisualState(bool useTransitions)
Parameters
useTransitions
Indicates whether transitions should be used.
ClearContainerForItemOverride(DependencyObject, object)
When overridden in a derived class, undoes the effects of the method.
Declaration
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
The container element.
item
The Item.
GetContainerForItemOverride()
Creates or identifies the element that is used to display the given item.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
DependencyObject
HandleKeyDown(Key, int)
Contains the keyboard navigation logic of RadComboBox.
Declaration
[SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "platformKeyCode")]
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
protected virtual bool HandleKeyDown(Key systemKey, int platformKeyCode)
Parameters
systemKey
Key
The key that has been pressed.
platformKeyCode
The platform key code of the pressed key.
Returns
True if the KeyDown event should be handled, otherwise false.
HandleTextInput(string)
Contains the text input logic of RadComboBox when the control is not editable. This method is called from a TextInput event handler.
IsItemItsOwnContainerOverride(object)
Determines if the specified item is (or is eligible to be) its own container.
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.
OnDropDownClosed(EventArgs)
Raises the event.
OnDropDownOpened(EventArgs)
Raises the event.
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(bool, bool)
Called when the IsDropDownOpen property is changed.
OnIsEditableChanged(bool, bool)
Called when the IsEditable property is changed.
OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
Called when the property has changed.
Declaration
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
Parameters
e
DependencyPropertyChangedEventArgs
The event data.
OnIsMouseWheelEnabledChanged(bool, bool)
Called when the IsMouseWheelEnabled property is changed.
OnMouseWheel(MouseWheelEventArgs)
Called before the event occurs to provide handling for the event in a derived class without attaching a delegate.
Declaration
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters
e
MouseWheelEventArgs
A MouseWheelEventArgs that contains the event data.
OnScrollIntoView(int)
Occurs when item at specific index is requested to be visible in the viewport.
Declaration
protected virtual void OnScrollIntoView(int itemIndex)
Parameters
itemIndex
The index of the item to scroll to.
OnSelectionChanged(SelectionChangedEventArgs)
Called when the selection changes.
Declaration
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
e
SelectionChangedEventArgs
The event data.
OnTextBoxStyleChanged()
Called when the TextBoxStyle property is changed.
Declaration
protected virtual void OnTextBoxStyleChanged()
OnTextChanged(string, string)
Called when the Text property is changed.
OnTextInput(TextCompositionEventArgs)
Invoked when the event is received.
Declaration
protected override void OnTextInput(TextCompositionEventArgs e)
Parameters
e
TextCompositionEventArgs
Information about the event.
PrepareContainerForItemOverride(DependencyObject, object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
Element used to display the specified item.
item
Specified item.
Events
DropDownClosed
Occurs when the drop-down list of the combo box closes.
DropDownOpened
Occurs when the drop-down list of the combo box opens.