Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Represents a multiple selection

Remarks

UXMultipleSelectionComboBox is a queryable combo box control derived from the UXDataComboBox which is specially designed to support multiple selection. All features in UXPageableComboBox, such as multiple column, sorting, and paging feature, are also supported in this control. To learn more about these features, see UXDataComboBox Overview and UXPageableComboBox Overview.

Example

The following code shows how to use UXMultipleSelectionComboBox control in single column.

Code Block
titleXAML
languagexml
<Intersoft:UXMultipleSelectionComboBox SearchResult="{Binding Customers}"
        FilterDescriptors="{Binding LookUpDescriptor.FilterDescriptors, Mode=TwoWay}" 
        SortDescriptors="{Binding LookUpDescriptor.SortDescriptors, Mode=TwoWay}" 
        PageDescriptor="{Binding LookUpDescriptor.PageDescriptor}" 
        DisplayMemberPath="ContactName"> 
        <Intersoft:UXMultipleSelectionComboBox.DataContext> 
                <ViewModels:CustomerViewModel/> 
        </Intersoft:UXMultipleSelectionComboBox.DataContext> 
</Intersoft:UXMultipleSelectionComboBox>

Modern note

Notice that if you use the paging feature, you need to do special handling in your ViewModel. See UXPageableComboBox to learn how to handle this behavior.

To enable multiple columns feature, simply add the following code to your UXMultipleSelectionComboBox control markup.

Code Block
titleXAML
languagexml
<Intersoft:UXMultipleSelectionComboBox.Columns> 
        <Intersoft:UXDataComboBoxTextColumn Header="Customer ID"
				Binding="{Binding CustomerID}"
                DisplayMode="Image" ImageHeight="64" ImageWidth="64"
				ImageStretch="Fill" ImageBinding="{Binding PhotoPath}"/> 
        <Intersoft:UXDataComboBoxTextColumn Header="Contact Name"
				Binding="{Binding ContactName}"/>
        <Intersoft:UXDataComboBoxTextColumn Header="Company Name"
				Binding="{Binding CompanyName}"/>
        <Intersoft:UXDataComboBoxTextColumn Header="Country"
				Binding="{Binding Country}"/> 
</Intersoft:UXMultipleSelectionComboBox.Columns>

To learn more about Columns in UXMultipleSelectionComboBox, see UXPageableComboBox Columns Overview.

Definition

public class UXMultipleSelectionComboBox : UXDataComboBox, IMultipleSelection

...

AutoFilterSelectedItemsGets or sets a value indicating whether the selected items will be filtered automatically.
CheckBoxHeaderVisibilityGets or sets the checkbox header visibility.
CheckBoxStyleGets or sets the style applied to the checkbox element.
InputSeparatorGets or sets the input separator.
IsTextSearchEnabledNot applicable.
KeyMemberPathGets or sets a value that represents the properties path used to filter the selected items when the UXMultipleSelectionComboBox is enabled.
RemoveItemCommandGets or sets command that will be invoked when removing an item.
SelectedItemConverter 
SelectedItemsGets or sets the selected items
SelectedItemsCollectionGets selected items collection.
SelectionInputControlStyleGets or sets the selection input control style.

...

public bool AutoFilterSelectedItems { get; set; }

Gets or sets a value indicating whether the selected items will be filtered automatically.

Remarks

In editable mode, UXMultipleSelectionComboBox includes smart result filtering capability. When this feature is enabled, the selected items will be not be included in the search result list. You can enable this feature by setting the AutoFilterSelectedItems property to true.

 

Anchor
P:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.CheckBoxHeaderVisibility
P:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.CheckBoxHeaderVisibility

...

public IValueConverter SelectedItemConverter { get; set; }

 

Remarks

The collection of data that has been selected will be assigned to the ISMultipleSelectionControl property. To get the selected items collection or initialize the selected items, you can easily bind the property from your ViewModel to the ISMultipleSelectionControl property of UXMultipleSelectionComboBox. For more details on how to initialize selected items, see How to Initialize Selected Items in UXMultipleSelectionComboBox. With SelectedItemConverter property, it allows you to bind a collection of items where the selected item type is different with the search result type. Note that you should set the SelectedValuePath property of UXMultipleSelectionComboBox for the selected items to work properly. This feature is particularly useful in such a scenario that you want to display the records from a table but you must bind it from another table that logically linked to a foreign key. In this case, you just need to assign the foreign key path to the ISSelectionControl property and UXMultipleSelectionComboBox will do the rest for you. You can see How to Implement Selected Items Converter in UXMultipleSelectionComboBox to learn more about this feature.

 

Anchor
P:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.SelectedItems
P:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.SelectedItems

public INotifyCollectionChanged SelectedItems { get; set; }

Gets or sets the selected items

Remarks

The collection of data that has been selected will be assigned to the ISMultipleSelectionControl property. To get the selected items collection or initialize the selected items, you can easily bind the property from your ViewModel to the ISMultipleSelectionControl property of UXMultipleSelectionComboBox. For more details on how to initialize selected items, see How to Initialize Selected Items in UXMultipleSelectionComboBox.

 

Anchor
P:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.SelectedItemsCollection
P:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.SelectedItemsCollection

...

public bool IsMultipleSelection()

Gets a value that indicates whether the current action is multiple selection.

Return Types

Value that indicates whether the current action is multiple selection. True if multiple selection.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnApplyTemplate
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnApplyTemplate

...

public void Select(int index, bool multipleSelection)

Select the item on specified index.

Parameters

indexIndex.
multipleSelectionIs multiple selection.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Select(System.Int32)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Select(System.Int32)

public void Select(int index)

Select the item on specified index.

Parameters

indexIndex.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Select(System.Object,System.Boolean)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Select(System.Object,System.Boolean)

public void Select(object item, bool multipleSelection)

Select the specified item.

Parameters

itemItem.
multipleSelectionIs multiple selection.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Select(System.Object)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Select(System.Object)

public void Select(object item)

Select the specified item.

Parameters

itemItem.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.SelectAll
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.SelectAll

...

public void Unselect(int index, bool multipleSelection)

Unselects item at specified index.

Parameters

indexIndex.
multipleSelectionIs multiple selection.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Unselect(System.Int32)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Unselect(System.Int32)

public void Unselect(int index)

Unselect the item at specified index.

Parameters

indexIndex.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Unselect(System.Object,System.Boolean)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Unselect(System.Object,System.Boolean)

public void Unselect(object item, bool multipleSelection)

Unselect the specified item.

Parameters

itemItem.
multipleSelectionIs multiple selection.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Unselect(System.Object)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Unselect(System.Object)

public void Unselect(object item)

Unselect the specified item.

Parameters

itemItem.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.UnselectAll
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.UnselectAll

...

protected void ChangeVisualState(bool useTransitions)

Change visual state.

Parameters

useTransitionsUse transition.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.ClearSelection
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.ClearSelection

...

protected void ClearSelection(object except)

Clear current selection.

Parameters

exceptExcept specified object.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.GetContainerForItemOverride
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.GetContainerForItemOverride

protected DependencyObject GetContainerForItemOverride()

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

Return Types

The element that is used to display the given item.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.InitializeSelectedItems
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.InitializeSelectedItems

...

protected void InitializeSelection(DependencyObject element, object item)

Initialize selection.

Parameters

elementThe container element used to display the specified item.
itemThe item to display.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.IsItemItsOwnContainerOverride(System.Object)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.IsItemItsOwnContainerOverride(System.Object)

protected bool IsItemItsOwnContainerOverride(object item)

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

Parameters

itemThe item to check.

Return Types

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

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Menu_Opened(System.Object,Intersoft.Client.Framework.ISRoutedEventArgs)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Menu_Opened(System.Object,Intersoft.Client.Framework.ISRoutedEventArgs)

protected void Menu_Opened(object sender, ISRoutedEventArgs e)

Called when the drop down menu is opened.

Parameters

senderThe source object.
eThe event argument.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Menu_Repositioned(System.Object,Intersoft.Client.UI.Controls.UXPopUpEventArgs)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.Menu_Repositioned(System.Object,Intersoft.Client.UI.Controls.UXPopUpEventArgs)

protected void Menu_Repositioned(object sender, UXPopUpEventArgs e)

Called when the drop down menu is repositioned.

Parameters

senderThe source object.
eThe event argument.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnGotFocus(System.Windows.RoutedEventArgs)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnGotFocus(System.Windows.RoutedEventArgs)

protected void OnGotFocus(RoutedEventArgs e)

Called before element GotFocus event occurs.

Parameters

eThe data for the event.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs)

protected void OnItemsChanged(NotifyCollectionChangedEventArgs e)

Called when the value of the ItemsControl.Items property changes.

Parameters

eNotifyCollectionChangedEventArgs that contains the event data.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnItemsSourceChanged(System.Collections.IEnumerable,System.Collections.IEnumerable)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnItemsSourceChanged(System.Collections.IEnumerable,System.Collections.IEnumerable)

protected void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)

Called when the ItemsSource changes.

Parameters

oldValue 
newValue 

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnLostFocus(System.Windows.RoutedEventArgs)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnLostFocus(System.Windows.RoutedEventArgs)

protected void OnLostFocus(RoutedEventArgs e)

Called before element LostFocus event occurs.

Parameters

eThe data for the event.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs)

protected void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Called when MouseLeftButtonDown event occurs.

Parameters

eThe data for the event.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnSelectedIndexChanged(System.Int32,System.Int32)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnSelectedIndexChanged(System.Int32,System.Int32)

protected void OnSelectedIndexChanged(int oldIndex, int newIndex)

Called when the value of the SelectedIndex property changes.

Parameters

oldIndexThe old value of the SelectedIndex property.
newIndexThe new value of the SelectedIndex property.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnSelectedItemChanged(System.Object,System.Object)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnSelectedItemChanged(System.Object,System.Object)

protected void OnSelectedItemChanged(object oldItem, object newItem)

Called when the value of the SelectedItem property changes.

Parameters

oldItemThe old value of the SelectedItem property.
newItemThe new value of the SelectedItem property.

 

Anchor
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnSelectedValueChanged(System.Object,System.Object)
M:Intersoft.Client.UI.Data.UXMultipleSelectionComboBox.OnSelectedValueChanged(System.Object,System.Object)

...