CheckListBox

Derives from Xceed.Wpf.Toolkit.Primitives.Selector

The CheckListBox control is a ListBox in which each item is represented with a CheckBox. The CheckBox.IsSelected can be data bound using the SelectedMemberPath property. The CheckListBox also provides a Command property which will execute everytime an item is checked/unchecked. The CommandParameter is the recently checked/unchecked item.

NOTE: As of v1.6.0, this control derives from Selector.

checklistbox.jpg

         <xctk:CheckListBox x:Name="_listBox" 
                            Height="250"
                            DisplayMemberPath="Color"
                            ValueMemberPath="Level" 
                            SelectedMemberPath="IsSelected"
                            SelectedValue="{Binding SelectedValue}"
                            SelectedItemsOverride="{Binding SelectedItems}" />

Properties

Property Description
Command Gets or sets the command to execute when an item is checked/unchecked. (Inherited from Selector)
Delimiter Gets or sets the string used to separate the concatenated string representations of the checked items. (Inherited from Selector)
SelectedItem Gets or sets the last checked item. (Inherited from Selector)
SelectedItems Gets the collection of checked items. (Inherited from Selector)
SelectedItemsOverride Gets or sets the list of SelectedItems. (Inherited from Selector)
SelectedMemberPath Gets or sets a path to a value on the source object used to determine whether an item is selected. (Inherited from Selector)
SelectedValue Gets or sets a string containing the selected items separated by the value of Delimiter (ex., "Item1, Item2, Item3"). (Inherited from Selector)
ValueMemberPath Gets or sets a path to a value on the source object representing the value to use. (Inherited from Selector)

Events

Event Description
ItemSelectionChanged Raised when an item's selection is changed. (Inherited from Selector)


Support this project, check out the Plus Edition.
---

Last edited Jun 9 at 5:28 PM by dlafontaine, version 13

Comments

Garnett Mar 1, 2013 at 10:27 PM 
How do I make it scroll horizontally instead of vertically. ie. multiple columns

emartin Feb 27, 2013 at 6:06 PM 
Please use the Issue tab to log any bugs related to this control.

parkstech Feb 27, 2013 at 1:18 PM 
The properties and events are there, they are pretty much unusable but they are there. I for one would like to see documentation on this control. It makes a pretty picture but it doesn't seem willing to cooperate with an ObservableCollection or IEnumerable.

emartin Feb 20, 2013 at 12:03 PM 
@cado1982. [This issue](http://wpftoolkit.codeplex.com/workitem/19365) has been created based on your question. Please use the Discussion tab for your questions.

cado1982 Feb 19, 2013 at 6:13 PM 
Since updating to 1.9.0, the CheckListBox seems to have lost the padding between items in the list. Any ideas on how to get it back?

emartin Jan 10, 2013 at 5:41 PM 
bradtwurst: Documentation fixed. Thanks!

bradtwurst Dec 20, 2012 at 8:41 PM 
According to http://wpftoolkit.codeplex.com/workitem/18709

To define the CheckListBox.SelectedIems in XAML, you should use CheckListBox.SelectedIemsOverride.

As of v1.8 of the toolkit, the xaml example in the above docs is now incorrect.

Tempeck Apr 11, 2012 at 3:08 PM 
I think I found a bug. I added items from xaml. When i want to get selected items from code i get an exception. SelectedItems are type of MainWindow not SelectorItem.

lextm Feb 25, 2012 at 5:19 AM 
I think it may be better if we can change the check box element to a switch element, just like what Microsoft does in Visual Studio Productivity Power Tools (under Tools Options Support section, the image shows the visual effects). This iPhone switch control alike style makes it easier to use on touch enabled Windows system.

tzographos Feb 19, 2012 at 8:47 PM 
Where are the properties you mention? For example, where is property CheckedItems ?

jofi Dec 7, 2011 at 1:55 PM 
Is there any chance to get a ToolTipMemberPath?

brianlagunas Dec 5, 2011 at 2:01 PM 
The released version does (v1.5). Not the source, because of changes to the control architecture.

andrew19ao Dec 5, 2011 at 4:21 AM 
The CheckListBox has none of those properties or events