ComponentOne Input Library for WPF
Input Library Overview / Multiselect / Work with Multiselect / Selection
In This Topic
    Selection
    In This Topic

    MultiSelect allows you to modify the way of selection of items in multiple ways. Let us explore these ways in the following sections.

    Selection Modes

    MultiSelect provides SelectionMode property to determine whether you can select one or more than one item from the header. This property lets you choose between the following selection modes through C1SelectionMode enumeration:

    The following GIF showcases the MultiSelect control with SelectionMode set as Single.

    WPF MultiSelect SelectionMode

    To set the selection mode to single, use the following code:

    <c1:C1MultiSelect x:Name="mselect" SelectionMode="Single" Height="100" Width="350" ></c1:C1MultiSelect>
    
    mselect.SelectionMode = C1SelectionMode.Single;
    

    Back to Top

    Show SelectAll

    MultiSelect allows you to select all items from the dropdown list at once simply by setting the ShowSelectAll property to true. Setting this property displays a "SelectAll' check box in the dropdown list of the MultiSelect control as shown in the following image.

    WPF MultiSelect showing selectall check box

    The following example uses the Products table from NWind to show the list of products in the MultiSelectListBox control.

    <c1:C1MultiSelect x:Name="mselect" ShowSelectAll="True" Height="100" Width="350"></c1:C1MultiSelect>
    
    mselect.ShowSelectAll = true;
    

    Back to Top