title: What's the simplest way to bind a list of checkboxes to a list of checked values
body: <p>I have a list of <code>AvailableItems</code> that I want to display as a list of checkboxes, so that users can pick which items to generate, which are then stored in another list called <code>ItemsToGenerate</code> (my lists are actually just lists of strings). </p>
  
  <p>Showing all available items with corresponding checkboxes is easy:</p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{Binding Path=AvailableItems}"&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;CheckBox Content="{Binding}" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;    
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>But now I need to bind each Checkbox.IsChecked property, to the fact that the item is in the <code>ItemsToGenerate</code> list. I thought of making a <code>ListContainmentToBoolConverter</code> like this:</p>
  
  <pre><code>IsChecked="{Binding Path=ItemsToGenerate, 
              Converter={StaticResource ListContainmentToBoolConverter}}"
  </code></pre>
  
  <p>But that doesn't work because I'm missing a <code>ConverterParameter</code> to pass the value of each item, but I can't do that, because <code>ConverterParameter</code> does not support binding.</p>
  
  <p>Any ideas?</p>