title: Multiple checkbox in list and is check in wpf
body: <p>I've got a question, I have a list of checkbox in combobox box and it looks like this:</p>
  
  <pre><code>                 &lt;StackPanel Orientation="Vertical" DataContext="{Binding CandidateEntity}"&gt;
  
                          &lt;StackPanel Orientation="Horizontal"&gt;
  
                              &lt;ComboBox ItemsSource="{Binding DataContext.SkillSetEntities, ElementName=CrudCandidate }"
                                  IsEditable="True" IsReadOnly="True" Text="Umiejętności"&gt;
                                  &lt;ComboBox.ItemTemplate&gt;
                                      &lt;DataTemplate&gt;
                                          &lt;CheckBox Content="{Binding Name}" IsChecked="{Binding IsChecked}" /&gt;
                                      &lt;/DataTemplate&gt;
                                  &lt;/ComboBox.ItemTemplate&gt;
                              &lt;/ComboBox&gt;
                          &lt;/StackPanel&gt;
  
                   &lt;/StackPanel&gt;
  </code></pre>
  
  <p>Now I also have a collection of skillset objects in binded item source (CandidateEntity.SkillSets), now how can I check those checkboxes that are in my collection of skillset objects?</p>
  
  <p>I want to create a edition for CandidateEntity object in form and part of that edition is list of skillset that is represented in combobox.</p>
  
  <p>EDIT: </p>
  
  <p>I have solved problem by adding to skillset model prop:</p>
  
  <pre><code> private bool _isSelected = false;
  
      [NotMapped]
      public bool IsSelected
      {
          get
          {
              return this._isSelected;
          }
          set
          {
              _isSelected = value;
          }
      }
  </code></pre>
  
  <p>And then in view model:</p>
  
  <pre><code>    private List&lt;SkillSet&gt; GetSkillSets()
      {
          var skillsetList = this._catalog.SkillSets.ToList();
          var candidateSkillsetList = this.CandidateEntity.SkillSets.ToList();
          foreach (SkillSet skillset in skillsetList)
          {
              foreach (SkillSet candidateSkillset in candidateSkillsetList)
              {
                  if (skillset.id == candidateSkillset.id)
                  {
                      skillset.IsSelected = true;
                  }
              }
          }
  
          return skillsetList;
     }
  </code></pre>
  
  <p>and in checkbox in wpf:</p>
  
  <pre><code>&lt;CheckBox Content="{Binding Name}" IsChecked="{Binding IsSelected}"/&gt;
  </code></pre>
  
  <p>BUT I am pretty sure there must be easier way to handle that, is there?</p>