Using MVVM to work with CheckBoxes in XamDataGrid

On my other blog, I published a way to put CheckBoxes into the XamDataGrid.  The interesting aspect of the implementation, in my opinion, is how it uses the Model-View-ViewModel pattern to maintain the check state of each CheckBox.  Since I put a CheckBox into the header area above the CheckBoxes in each row, I used a ViewModel object to encapsulate the logic that figures out what state the header CheckBox should have, and how to update the state of each row’s CheckBox.  It’s just another example of how great MVVM is when working with WPF.

Here’s a screenshot of that demo app:

You can read that blog post here.

One Response to Using MVVM to work with CheckBoxes in XamDataGrid

%d bloggers like this: