Using ContentControl3D in XamDataGrid cells

March 26, 2009

Due to user feedback, I created a sample that shows how you can use ContentControl3D to host content in the cells of the Infragistics XamDataGrid.  I really like this idea, and think it has a lot of potential in many different kinds of applications.  It allows you to compress a lot of information into one column in the data grid.  The following screenshot from the demo app shows two records: one is showing the front side of a ContentControl3D, the other is showing the back side (the edit form)…

cc3d in xdg

You can download this demo app from the Releases page of the Thriple project.  The demo app requires that you have the Infragistics NetAdvantage for WPF product installed (trial version or regular version) in order to run it.


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!


Editing metadata in the adorner layer

September 12, 2008

Today I created a solution to a problem involving where and how to edit metadata about a value in the XamDataGrid.  I  blogged about it on my work blog here.  The really cool part about the solution, in my opinion, is that I host an editor for the metadata in the adorner layer.  The metadata is an explanation for why the user modified the value of a cell in the grid.  To me, it just makes sense to put such extraneous information “outside of” the grid, so that it does not clutter up the UI and require the grid cells to be larger than necessary.

Here’s a screenshot of the metadata editor in action:

I think this sample really shows how powerful and flexible WPF is.


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…


When will WPF become a mainstream platform?

August 9, 2007

I have been involved with WPF for over a year and a half now.  I’ve seen it grow from shaky CTP builds into a great v1 platform.  Ask anyone who has worked with WPF in a non-trivial way, and you are bound to hear that it is leaps and bounds better than Windows Forms.  The platform is publicly released now and is a truly great technology, but its adoption rate is still quite low.  I’ve read numerous reports that WPF is not gaining much traction in the software world yet, and a quick search for open WPF jobs verifies it (no, I’m not looking to change jobs!). Why is WPF not being rapidly adopted?  Here are my thoughts on the issue.

Beta?  We don’t use no stinkin’ Beta!

Working with WPF currently requires you to use a beta version of Visual Studio, either VS2005 with the “Orcas” extensions or a beta build of VS2008.  Most companies don’t want their development staff building products with beta versions of Visual Studio.  Even though WPF v1 has been publicly released, the tools for working with it are still in beta.  That’s probably the biggest deterrent for most shops.  At this point, only AlphaGeeks are willing to install beta builds of VS2008 on their home machine and play with WPF in their free time.

DataGrid?  We don’t have no stinkin’ DataGrid!

WPF v1 is missing a lot of the bread and butter support for most line-of-business (LOB) apps.  The canonical example is the fact that there is no out-of-the-box DataGrid control.  Beyond that, there is no masked editor, no date/time picker, and others.  For a lot of people this is a major turnoff.  WPF v1 is just not “there yet” as a platform for developing LOB apps, many would say.

Graphic Designers?  We don’t have no stinkin’ Graphic Designers!

In my opinion, Microsoft’s marketing team pushed the “designer-developer workflow” aspect of WPF way too much.  The whole idea that WPF allows graphic designers and developers to work closely together, with XAML as the common format they share, is not that important to many software shops/IT departments.  Many shops don’t have graphic designers, so this whole aspect of WPF is completely unimportant to them.  The marketing around WPF makes the platform seem to be important for companies that create highly specialized user interfaces (i.e. Times Reader), but not standard LOB apps.  That’s an unfortunate misperception, and couldn’t be further from the truth.

Tomorrow, tomorrow, I’ll love you tomorrow.

Now that I’ve set up all the ducks in a row, let’s blow their little heads off.  🙂

The obvious answer to the Beta problem is simply to wait for VS2008 to be officially released.  I predict that once VS2008 hits the market, WPF will start to gain a lot of momentum.  As shops start installing the new Visual Studio on their dev machines, and developers start exploring WPF there will be a surge of interest in the platform.  People will start considering WPF for their next app.  I think that will be the most important catalyst for WPF adoption.

The DataGrid problem has already been solved somewhat.  There are third-party WPF grid controls out there today, by companies such as Infragistics and Xceed.  In fact Infragistics has also created a masked editor, date/time picker, and other common controls that WPF does not have by default. 

I’ve heard rumors that Microsoft is going to develop a DataGridView replacement for WPF, but who knows when/if that hits the street.  The more general problem of WPF not being LOB-friendly is the main thrust behind the next release of WPF; which is part of the .NET 3.5 Framework.  Since 3.5 will be included in VS2008, the first non-beta version of Visual Studio which natively supports WPF will have all the new LOB-friendliness in it.

Lastly we have the Graphic Designer problem.  There is not much that Microsoft can do to remedy the fact that many companies don’t have such people around to make WPF apps look great.  However, I think that third-party vendors can save the day here.  Basically they have their graphic designers create eye-pleasing themes and then wrap them up in resource dictionaries which can be used by any WPF application.  Infragistics already has created what they call “ThemePacks” which allow you to do this.  I think this is a great idea!

In conclusion, I think there is still a ways to go before WPF is the de facto UI platform for most .NET shops.  Until then, I think it is wise to keep learning about WPF.  When there starts to be high demand for WPF developers it will be the people involved with the platform now who will be the highly paid experts. 😉


Data Grids in WPF (coming soon to a browser near you)

April 20, 2007

I have been whining and moaning about the lack of a DataGridView replacement in WPF for a while.  During that time, Infragistics and Xceed have been busy filling that gap, so I can’t clamor on about it any more.  Soon I will be publishing some posts about the grids, what features they have, how they can be customized, etc.  I think that is an important body of knowledge to bring to the table.

On a tangent, word on The Grapevine is that if you have a subscription to Infragistics’s NetAdvantage suite on April 22nd, you will automatically get their WPF control suite for free.  If that’s true, then it’s a pretty sweet deal for those of us with NetAdvantage subscriptions!  I suppose they have that deal set up to encourage folks to renew their subscriptions, and it will probably work considering the payback! 

Soon you can expect to start seeing some info here on my blog about the all-important WPF data grids.  Until then, try to ignore the drum roll.