A TreeView, a HierarchicalDataTemplate, and a 2D collection walk into a bar …

Bea has a handy post describing how to group items in a collection using a CollectionViewSource.  I was looking at that, and a post on the WPF forum from markovuksanovic, and for fun created a version of Bea’s example that uses a 2D collection instead of the CollectionViewSource.  (I found a bunch of HierarchicalDataTemplate examples…

9

Limited generics support in Xaml

In a post to the WPF forum, Zhou Yong had the idea to use a MarkupExtension to make it possible to create a generic dictionary (Dictionary<K,V>) from Xaml.  It’s a cool idea, so I played with it a bit, with the result shown below.  The end result is that you can do the following, for…

12