---
title: "WPF Binding Checkbox Content and IsChecked to Different Lists"  
description: "WPF Binding Checkbox Content and IsChecked to Different Lists"  
author: "Mark Devid"  
published: 2013-09-24  
updated: 2013-09-24  
canonical: https://www.mindstick.com/forum/1517/wpf-binding-checkbox-content-and-ischecked-to-different-lists  
category: "wpf"  
tags: ["wpf"]  
reading_time: 2 minutes  

---

# WPF Binding Checkbox Content and IsChecked to Different Lists

I have an issue with [binding](https://www.mindstick.com/blog/146/dynamic-binding-in-c-sharp) [multiple](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) [properties](https://www.mindstick.com/articles/23331/nootropics-7-different-types-and-their-unique-properties) to a single control. I have two lists called UserList and GroupList. I'm trying to display a [ListView](https://www.mindstick.com/articles/12744/listview-in-android) of checkboxes of all the groups in the system. The UserList object contains a list of integers based on the ID of the groups it is a member of. I'd like to have the checkboxes be checked if the UserList object contains an ID of a group in the groupList.

For example, the GroupList might contain IDs 1,2,3,4. While the UserList has a list of IDs of 1 and 3. I'd therefore like checkboxes 1 and 3 checked, but 2 and 4 unchecked.

To do this, I need to bind to two different properties at the same time and possible have some kind of converter. I'm pretty new to this stuff, so I'm kind of stuck as to what to try next. Here's what I've currently got -

<ListView Name="ListBox1"

Grid.Row="1"

Margin="30,4,30,22"

FontFamily="Segoe UI"

FontSize="14"

ItemsSource="{Binding GroupList,

UpdateSourceTrigger=PropertyChanged}">

<ListView.ItemTemplate>

<DataTemplate>

<[CheckBox](https://www.mindstick.com/articles/291/how-should-use-checkbox-control-in-vb-dot-net) Margin="2"

[Content](https://www.mindstick.com/articles/13019/get-the-best-content-marketing-pricing-packages-for-your-brand)="{Binding Name}"

IsChecked="{Binding Source={StaticResource UserGroupDataProvider}}" />

</DataTemplate>

</ListView.ItemTemplate>

Obviously I'm [missing](https://answers.mindstick.com/qa/52138/international-missing-children-s-day-2019-was-observed-on) some kind of [static](https://www.mindstick.com/articles/12098/the-static-keyword-the-static-methods) [resource](https://www.mindstick.com/blog/43433/top-best-resources-for-women-about-beauty-and-health), but I'm not sure what to do with that.

Any [advice](https://yourviews.mindstick.com/view/50528/filament-advice-5-things-to-consider-before-you-buy-a-filament) would be appreciated.

## Replies

### Reply by Pravesh Singh

Hi Mark,

here's the code I used

```
    <CheckBox.IsChecked>        <MultiBinding Converter="{StaticResource CollectionToBoolConverter}" Mode="OneWay">            <Binding Path="ID" />            <Binding ElementName="Me" Path="User.GroupList" />        </MultiBinding>    </CheckBox.IsChecked>
```

Where ElementName=Me is specified up top as the form I'm using.

Hopefully this will solve your problem.


---

Original Source: https://www.mindstick.com/forum/1517/wpf-binding-checkbox-content-and-ischecked-to-different-lists

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
