title: best way to have checkbox column in WPF datagrid with header checkbox (select all) and MVVM
body: <p>I was using <em>DevExpress</em> components, with selectall view.
  because its hard to customize <em>DevExpress</em> style, I decide to use WPF default <code>DataGrid</code>.</p>
  
  <p>what is the best way to have Select All checkbox in WPF DataGrid ?
  there is no complete solution and/or working solution in the net.</p>
  
  <p>I need to bind checkbox <code>IsChecked</code> to selected Items/Rows.
  <code>SelectedItems</code> is readonly. so I used solution in </p>
  
  <p><a href="http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html" rel="nofollow">http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html</a></p>
  
  <p>but I am not sure how bind selected item to <code>IsChecked</code>, and MVVM.</p>
  
  <p>do I need to add extra field for bool <code>SelectAll</code> in my model ?</p>
  
  <p>please let me know your solution.</p>
  
  <p>Thank you.</p>