title: How to get selected items from listbox has checkboxes in WPF?
body: <p>This is the ListBox code:</p>
  
  <pre><code>&lt;ListBox x:Name="courseslistview" 
           ItemsSource="{Binding .}" 
           FontSize="18.667" 
           FontFamily="Trebuchet MS" 
           LayoutUpdated="courseslistview_LayoutUpdated"&gt;
      &lt;ListBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;CheckBox Content="{Binding .}" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListBox.ItemTemplate&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>How can I use C# to get all the checked checkboxes in the above ListBox?</p>