Conserving screen real estate via the adorner layer

September 14, 2008

I spent the weekend building and expanding on my previous work adorning XamDataGrid with editor controls.  I made leaps and bounds of progress, and am very excited about the result.  As much of the functionality that can be abstracted away now lives as an attached behavior, called DisplayAdornerEditors.  I wrote a big post about it on my other blog, so if you’re interested, I highly recommend you check it out here!

WPF is amazing!

Using Attached Behaviors to Add Currency Support to XamDataGrid

September 9, 2008

I just found another great use for attached behaviors!  I used them to add to XamDataGrid the equivalent behavior of what WPF list controls get for free via the IsSynchronizedWithCurrentItem property.  You can check out how it works here.

Using MVVM to work with CheckBoxes in XamDataGrid

September 4, 2008

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.

Synchronized Field Widths in XamDataGrid

July 3, 2008

I tackled an interesting programming task where I needed the width of cells in child records of a XamDataGrid to stay in sync with the width of the corresponding cells in the parent record.  I worked through the problem and ended up with a pretty interesting solution, which I blogged about here.  Eventually the datagrid will provide that functionality out-of-the-box, but until then at least there’s a temporary solution.  WPF is so much fun!

Persisting field widths in XamDataGrid

June 20, 2008

I have been writing a lot about XamDataGrid on my other blog recently.  My most recent post shows how to save and load the widths of columns/fields across runs of the application.  This is just a temporary solution that will eventually be replaced by built-in functionality in the control, but until then, at least we now have a way to do this with ease.  My implementation even supports saving/loading the width of fields when showing hierarchical data (i.e. multiple related tables in the same grid).  Enjoy!

Post about unbound fields in XamDataGrid

June 16, 2008

If you use the Infragistics XamDataGrid, you might want to check out my latest post about it.  I put together a demo app that shows the proper way to embed controls into unbound fields, and react to the user interacting with them.  Here’s the obligatory screenshot…