title: WPF multi select Combobox find what is selected
body: <p>I have setup a WPF combobox which a user can select many items within it using checkboxes. The UI looks good, but now I need to know what is ticked in C# so I can filter a Datagrid correctly. </p>
  
  <p>Is there a way to do this with the code I already have below?</p>
  
  <pre><code>&lt;ComboBox Name="cmbWorkFlowType" Width="120" Height="22" Margin="144,57,0,0"    HorizontalAlignment="Left" VerticalAlignment="Top"&gt;
       &lt;ComboBox.ItemsSource&gt;
          &lt;CompositeCollection&gt;
             &lt;ComboBoxItem&gt;
                &lt;CheckBox x:Name="all"&gt;All&lt;/CheckBox&gt;
             &lt;/ComboBoxItem&gt;
             &lt;CollectionContainer Collection="{Binding Source={StaticResource WorkFlowTypeEnum}}" /&gt;
          &lt;/CompositeCollection&gt;
       &lt;/ComboBox.ItemsSource&gt;
       &lt;ComboBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
             &lt;CheckBox Name="chkTask" Checked="CheckBox_Click" Content="{Binding}" IsChecked="{Binding ElementName=all, Path=IsChecked, Mode=OneWay}"&gt;&lt;/CheckBox&gt;
          &lt;/DataTemplate&gt;
       &lt;/ComboBox.ItemTemplate&gt;
    &lt;/ComboBox&gt;
  </code></pre>
  
  <p>Even if I need to for loop around the combobox object to extract all the checked items, but I wouldn't know how to do this as the combobox doesn't use tickboxes in it's library so I don't think its possible?</p>