Using ContentControl3D in XamDataGrid cells

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.

6 Responses to Using ContentControl3D in XamDataGrid cells

  1. David Nelson says:

    Apologies for the off-topic comment, but I couldn’t find an email address or a contact link anywhere on your blog (feel free to point me to it if I am just blind).

    In my WPF application I am currently using the pattern of binding menus and buttons to ICommand objects exposed as properties in my ViewModel. This is the same pattern that you advocate in your most recent MSDN article. However, something that your article is missing, as are most examples on the subject, is the use of shortcut keys. WPF supports shortcuts in the form of KeyGestures and KeyBindings; however, the Command property of the KeyBinding class cannot be bound. So the only way to set it is to cast the DataContext to the type of the ViewModel so that the property can be referenced directly; and at that point the View is tightly coupled to the ViewModel again, which defeats the purpose of MVVM in the first place.

    What is your recommendation for dealing with this problem? I have seen a few offerings, but they are all too complicated for my taste. Shortcut keys in WinForms are as simple as (for example) setting the Shortcut property on the MenuItem class, and I don’t see any reason why they should be made any more complicated in WPF.

  2. Josh Smith says:


    This is a problem. I’ve read some approaches in the past, to include shortcut keys for menu items when binding to commands on ViewModel objects. I feel that this is a problem at the platform level, and I know that some key folks at Microsoft agree with this assessment. You might want to consider using the approach shown in this article:


  3. David Nelson says:

    I have previously read that article. In fact, it is in a relatively recent comment in that article that you state, “I no longer advocate using routed commands. 99% of the time you should use ICommands exposed off a ViewModel.” I was hoping that meant that you had found another way 🙂 Does this mean that you are advocating a pattern which essentially disallows shortcut keys?

  4. Josh Smith says:

    I guess you could put it that way. 😛

    If you need to have shortcut keys, then you can’t use the simple binding-to-VM approach. At least, not until Microsoft adds support for that into the platform.

  5. Sebastien Filion says:

    This question might be a bit off topic, but I read on the Thriple page that WPF has major memory leak issues in software rendering mode. We are observing this phenomenon in our applications with a similar 3D control. Do you have a link to any knowledge base article or anything where I could track the issue ? I need the patch when it comes out for XP, and I don’t know where to track it.

    Thanks !

%d bloggers like this: