syncfusion/wpf-ui-components-skills / skills/syncfusion-wpf-checkedlistbox
syncfusion-wpf-checkedlistbox
VerifiedImplements the Syncfusion WPF CheckedListBox (CheckListBox) control for multi-select lists with checkboxes. Use this when adding checklist controls, checkbox-enabled item lists, or SelectAll functionality in WPF applications. Covers data binding, appearance customization, grouping/sorting, item selection handling, and virtualization.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.0 KB |
| references/appearance-customization-examples.md | markdown | 3.1 KB |
| references/appearance-customization.md | markdown | 886 B |
| references/checking-and-selection-advanced.md | markdown | 2.2 KB |
| references/checking-and-selection.md | markdown | 7.3 KB |
| references/data-binding-examples.md | markdown | 2.0 KB |
| references/data-binding.md | markdown | 10.3 KB |
| references/getting-started-extras.md | markdown | 2.1 KB |
| references/getting-started.md | markdown | 10.4 KB |
| references/grouping-and-sorting-examples.md | markdown | 1.5 KB |
| references/grouping-and-sorting.md | markdown | 11.7 KB |
| references/layout-features.md | markdown | 3.0 KB |
| references/virtualization.md | markdown | 13.5 KB |
references/checking-and-selection-advanced.md
View on GitHub````markdown
# Checking and Selection — Advanced Examples
This file contains the extended examples and advanced scenarios moved from the main selection reference.
## Programmatic Selection (SelectedItems)
```csharp
// Check specific items by adding to SelectedItems
checkListBox.SelectedItems.Add(item1);
checkListBox.SelectedItems.Add(item2);
// Uncheck items by removing from SelectedItems
checkListBox.SelectedItems.Remove(item1);
```
## SelectedItems binding with MVVM
```csharp
public ObservableCollection<object> CheckedVegetables { get; set; }
// In ViewModel constructor
CheckedVegetables = new ObservableCollection<object>();
CheckedVegetables.Add(Vegetables[0]);
```
```xml
<syncfusion:CheckListBox ItemsSource="{Binding Vegetables}" SelectedItems="{Binding CheckedVegetables}" DisplayMemberPath="Name" />
```
## IsChecked binding (disable virtualization)
```xml
<syncfusion:CheckListBox ItemsSource="{Binding Items}">
<syncfusion:CheckListBox.Resources>
<Style TargetType="syncfusion:CheckListBoxItem">
<Setter Property="IsChecked" Value="{Binding IsChecked}" />
</Style>
</syncfusion:CheckListBox.Resources>
<syncfusion:CheckListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</syncfusion:CheckListBox.ItemsPanel>
</syncfusion:CheckListBox>
```
## Validation Example: Limit maximum selections
```csharp
private void CheckListBox_ItemChecked(object sender, ItemCheckedEventArgs e)
{
const int maxSelections = 3;
if (e.IsChecked && checkListBox.SelectedItems.Count > maxSelections)
{
checkListBox.SelectedItems.Remove(e.Item);
MessageBox.Show($"Maximum {maxSelections} items can be selected.");
}
}
```
## SelectAll behavior notes
- The SelectAll checkbox is tri-state (Unchecked / Intermediate / Checked). Clicking toggles between checked and unchecked; intermediate is shown when some children are selected.
## Troubleshooting
- If SelectedItems doesn't update with data-bound collections, ensure you're binding to the actual item instances (not new instances) and using `ObservableCollection`.
- For virtualization-related synching problems, prefer `SelectedItems` or disable virtualization when necessary.
````
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |