ComponentOne MultiSelect for WPF
Features / Selection
In This Topic
    In This Topic

    MultiSelect provides you with an option to select/deselect all items in the list with single selection. To enable this option, you need to set the ShowSelectAll property to true. On setting this property to true, the Select All check box appears on top of the list of items. When you deselect the Select All check box, all items in the list are deselected.

    The following GIF shows the Select All and Unselect All check box appear in the MultiSelect control.

    To enables Select All option in the MultiSelect control, use the following code:

    mselect.ShowSelectAll = True
    mselect.ShowSelectAll = true;

    In addition, MultiSelect also allows you to change the caption of Select All option using SelectAllCaption property and caption of Unselect All option using UnSelectAllCaption property of C1MultiSelect class.

    The following GIF shows the changed caption of Select All and Unselect All options in the MultiSelect control.

    To change the caption, use the following code:

    mselect.SelectAllCaption = "All Customers"
    mselect.UnselectAllCaption = "Uncheck All"
    mselect.SelectAllCaption = "All Customers";
    mselect.UnSelectAllCaption = "Uncheck All";

    Moreover, MultiSelect also allows you to control the number of items selected using MaxSelectedItems property provided by the C1MultiSelect class. This property accepts an integer value.

    The following GIF image shows the MultiSelect control with MaxSelectedItems property set to 3.

    To set the MaxSelectedItems property in the MultiSelect control, use the following code.

    mselect.MaxSelectedItems = 3;
    mselect.MaxSelectedItems = 3;