Class ComboBoxAdv
Represents an advanced combo box control that extends System.Windows.Controls.Primitives.Selector and supports text input layout selection.
Inheritance
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Shared.WPF.dll
Syntax
[SkinType(SkinVisualStyle = Skin.Office2007Blue, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/Office2007BlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Black, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/Office2007BlackStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Silver, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/Office2007SilverStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Blue, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/Office2010BlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Black, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/Office2010BlackStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Silver, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/Office2010SilverStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Blend, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/BlendStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Default, Type = typeof(ComboBoxAdv), XamlResource = "/Syncfusion.Shared.Wpf;component/Controls/ComboBoxAdv/Themes/Generic.xaml")]
[SkinType(SkinVisualStyle = Skin.VS2010, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/VS2010Style.xaml")]
[SkinType(SkinVisualStyle = Skin.Metro, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/MetroStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Transparent, Type = typeof(ComboBoxAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ComboBoxAdv/Themes/TransparentStyle.xaml")]
public class ComboBoxAdv : Selector, IDisposable, ITextInputLayoutSelector
Remarks
This control provides enhanced styling, layout integration, and selection behavior beyond the standard System.Windows.Controls.ComboBox.
Constructors
ComboBoxAdv()
Initializes a new instance of the ComboBoxAdv class.
Declaration
public ComboBoxAdv()
Fields
AllowMultiSelectProperty
Using a DependencyProperty as the backing store for AllowMultiSelect. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty AllowMultiSelectProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
AllowSelectAllProperty
Identifies the Syncfusion.Windows.Tools.Controls.ComboBoxAdv.EnableSelectAll dependency property.
Declaration
public static readonly DependencyProperty AllowSelectAllProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
AutoCompleteModeProperty
Using a DependencyProperty as the backing store for AutocompleteMode. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty AutoCompleteModeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
DefaultTextProperty
Using a DependencyProperty as the backing store for DefaultText. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty DefaultTextProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
DropDownContentTemplateProperty
Identifies the DropDownContentTemplate dependency property. This property enables animation, styling, and data binding for the dropdown content template of the ComboBoxAdv control.
Declaration
public static readonly DependencyProperty DropDownContentTemplateProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
EnableOKCancelProperty
Identifies the Syncfusion.Windows.Tools.Controls.ComboBoxAdv.EnableOkCancel dependency property.
Declaration
public static readonly DependencyProperty EnableOKCancelProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
EnableTokenProperty
Using a DependencyProperty as the backing store for IsEditable. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty EnableTokenProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
IsDropDownOpenProperty
Using a DependencyProperty as the backing store for IsDropDownOpen. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
IsEditableProperty
Using a DependencyProperty as the backing store for IsEditable. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty IsEditableProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
IsReadOnlyProperty
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
MaxDropDownHeightProperty
Using a DependencyProperty as the backing store for MaxDropDownHeight. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MaxDropDownHeightProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
searchText
Declaration
public string searchText
Field Value
| Type |
|---|
| System.String |
SelectedItemsProperty
Using a DependencyProperty as the backing store for SelItems. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedItemsProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
SelectedValueDelimiterProperty
Using a DependencyProperty as the backing store for SelectedValueDelimiter. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedValueDelimiterProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
SelectionBoxItemProperty
Using a DependencyProperty as the backing store for SelectionBoxItem. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectionBoxItemProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
SelectionBoxItemStringFormatProperty
Using a DependencyProperty as the backing store for SelectionBoxItemStringFormat. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectionBoxItemStringFormatProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
SelectionBoxItemTemplateProperty
Using a DependencyProperty as the backing store for SelectionBoxItemTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectionBoxItemTemplateProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
SelectionBoxTemplateProperty
Using a DependencyProperty as the backing store for SelectionBoxTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectionBoxTemplateProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
TextProperty
Using a DependencyProperty as the backing store for Text. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TextProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Properties
AllowMultiSelect
Gets or sets a value indicating whether [allow multi select].
Declaration
public bool AllowMultiSelect { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
AllowSelectAll
Gets or sets a value that indicates whether the SelectAll option is enabled or not.
Declaration
public bool AllowSelectAll { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true if the SelectAll option is enabled; otherwise, false. The default value is false. |
Remarks
The SelectAll option is only available when the MultiSelect option is enabled.
AutoCompleteMode
Gets or sets the AutoCompleteModes that specifies how auto complete should be performed.
Declaration
public AutoCompleteModes AutoCompleteMode { get; set; }
Property Value
| Type |
|---|
| AutoCompleteModes |
Remarks
| AutoCompleteModes | Describes the AutoComplete mode |
|---|---|
| None | Autocomplete not performed |
| Suggest | Suggest the items based on entered text |
DefaultText
Declaration
public string DefaultText { get; set; }
Property Value
| Type |
|---|
| System.String |
DropDownContentTemplate
Gets or sets the System.Windows.DataTemplate used to define the visual structure of the dropdown content in the ComboBoxAdv.
Declaration
public DataTemplate DropDownContentTemplate { get; set; }
Property Value
| Type |
|---|
| System.Windows.DataTemplate |
EnableOKCancel
Gets or sets a value that indicates whether the OkCancel option is enabled or not.
Declaration
public bool EnableOKCancel { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true if the OkCancel option is enabled; otherwise, false. The default value is false. |
Remarks
The OkCancel option is only available when the MultiSelect option is enabled.
EnableToken
Gets or sets a value that indicates whether the Token support is enabled or not.
Declaration
public bool EnableToken { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true if EnableToken option is enabled; otherwise, false. The default value is false. |
Remarks
This property is applicable only for Multiselection AllowMultiSelect
IsDropDownOpen
Declaration
public bool IsDropDownOpen { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
IsEditable
Declaration
public bool IsEditable { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
IsReadOnly
Declaration
public bool IsReadOnly { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
MaxDropDownHeight
Declaration
public double MaxDropDownHeight { get; set; }
Property Value
| Type |
|---|
| System.Double |
newTempChar
Declaration
public char newTempChar { get; set; }
Property Value
| Type |
|---|
| System.Char |
oldTempChar
Declaration
public char? oldTempChar { get; set; }
Property Value
| Type |
|---|
| System.Nullable<System.Char> |
SelectedItems
Declaration
public IEnumerable SelectedItems { get; set; }
Property Value
| Type |
|---|
| System.Collections.IEnumerable |
SelectedValueDelimiter
Declaration
public string SelectedValueDelimiter { get; set; }
Property Value
| Type |
|---|
| System.String |
SelectionBoxItem
Declaration
public object SelectionBoxItem { get; }
Property Value
| Type |
|---|
| System.Object |
SelectionBoxItemStringFormat
Declaration
public string SelectionBoxItemStringFormat { get; }
Property Value
| Type |
|---|
| System.String |
SelectionBoxItemTemplate
Declaration
public DataTemplate SelectionBoxItemTemplate { get; }
Property Value
| Type |
|---|
| System.Windows.DataTemplate |
SelectionBoxTemplate
Declaration
public DataTemplate SelectionBoxTemplate { get; set; }
Property Value
| Type |
|---|
| System.Windows.DataTemplate |
Text
Declaration
public string Text { get; set; }
Property Value
| Type |
|---|
| System.String |
Methods
Dispose()
Releases resources used by the ComboBoxAdv control.
Declaration
public void Dispose()
GetContainerForItemOverride()
Creates or identifies the element used to display the specified item.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
| Type | Description |
|---|---|
| System.Windows.DependencyObject | A System.Windows.Controls.ComboBoxItem. |
IsItemItsOwnContainerOverride(Object)
Determines if the specified item is (or is eligible to be) its own ItemContainer.
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | item | Specified item. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the item is its own ItemContainer; otherwise, false. |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Creates and returns a new ComboBoxAdvAutomationPeer for the ComboBoxAdv control.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
| Type | Description |
|---|---|
| System.Windows.Automation.Peers.AutomationPeer | An instance of System.Windows.Automation.Peers.AutomationPeer that provides UI Automation support for the control. |
OnDisplayMemberPathChanged(String, String)
Override Method for DisplayMemberPath
Declaration
protected override void OnDisplayMemberPathChanged(string oldDisplayMemberPath, string newDisplayMemberPath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | oldDisplayMemberPath | |
| System.String | newDisplayMemberPath |
OnItemChecked(Object, ObservableCollection<Object>)
Handle the selected items when the item is checked.
Declaration
protected virtual ObservableCollection<object> OnItemChecked(object checkedItem, ObservableCollection<object> selectedItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | checkedItem | checked item. |
| System.Collections.ObjectModel.ObservableCollection<System.Object> | selectedItems | Selected items. |
Returns
| Type | Description |
|---|---|
| System.Collections.ObjectModel.ObservableCollection<System.Object> | The selected items. |
OnItemsChanged(NotifyCollectionChangedEventArgs)
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Specialized.NotifyCollectionChangedEventArgs | e |
OnItemsSourceChanged(IEnumerable, IEnumerable)
Called when the ItemsSource property changes.
Declaration
protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.IEnumerable | oldValue | The previous items source. |
| System.Collections.IEnumerable | newValue | The new items source. |
OnItemUnchecked(Object, ObservableCollection<Object>)
Handle the selected items when the item is unchecked.
Declaration
protected virtual ObservableCollection<object> OnItemUnchecked(object unCheckedItem, ObservableCollection<object> selectedItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | unCheckedItem | un checked item. |
| System.Collections.ObjectModel.ObservableCollection<System.Object> | selectedItems | Selected Items |
Returns
| Type |
|---|
| System.Collections.ObjectModel.ObservableCollection<System.Object> |
OnKeyUp(KeyEventArgs)
Called on key press in combobox
Declaration
protected override void OnKeyUp(KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.KeyEventArgs | e | Event argument |
OnLostFocus(RoutedEventArgs)
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.RoutedEventArgs | e |
OnPreviewKeyDown(KeyEventArgs)
Invoked on PreviewKeyDown
Declaration
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.KeyEventArgs | e |
OnRenderSizeChanged(SizeChangedInfo)
To determine the popup location while combobox height changed
Declaration
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.SizeChangedInfo | sizeInfo | Item size info |
OnSelectionChanged(SelectionChangedEventArgs)
Called when the selection changes.
Declaration
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Controls.SelectionChangedEventArgs | e | The event data. |
OnTextInput(TextCompositionEventArgs)
Override TextInput
Declaration
protected override void OnTextInput(TextCompositionEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.TextCompositionEventArgs | e |
PrepareContainerForItemOverride(DependencyObject, Object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyObject | element | Element used to display the specified item. |
| System.Object | item | Specified item. |
ResetSelectedItems()
Clears the selection tracking for the ComboBoxAdv control.
Declaration
protected void ResetSelectedItems()
UpdateSelectAllItemState()
Updates the SelectAllCheckBox state when changing the value to other items.
Declaration
protected void UpdateSelectAllItemState()
UpdateSelectedItems()
Updates the selected items in the ComboBoxAdv control.
Declaration
protected void UpdateSelectedItems()
Events
DropDownClosed
Occurs when the drop-down list of the combo box closes.
Declaration
public event EventHandler DropDownClosed
Event Type
| Type |
|---|
| System.EventHandler |
DropDownOpened
Occurs when the drop-down list of the combo box opens.
Declaration
public event EventHandler DropDownOpened
Event Type
| Type |
|---|
| System.EventHandler |
Explicit Interface Implementations
ITextInputLayoutSelector.GetSelectedItems()
Method used to get selected items of InputView.
Declaration
IEnumerable ITextInputLayoutSelector.GetSelectedItems()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerable | Returns IEnumerable collection, that represents items selected in InputView. |
ITextInputLayoutSelector.IsTextInputLayoutChild
Boolean value that indicates the parent is SfTextInputLayout or not.
Declaration
bool ITextInputLayoutSelector.IsTextInputLayoutChild { get; set; }
Returns
| Type |
|---|
| System.Boolean |