About a thousand years ago, I was involved with a demo that showed the use of WPF to visualize hierarchical data. We had many requests for the code, but wasn't able to provide it...until now. At long last, we are making the code for the hierarchical view carousel available.
The Hierarchical View Carousel is a prototype of a different model of navigating hierarchies, based on using a 3D effect that allows the user to better visualize the relationships between nodes. If you are curious as to what this is, check out this snip from the Channel 9 video I did with Simon Guest.
When you first launch the application, the control will load offline data that "mashes up" Microsoft CRM data, SAP data and shipping data. The notion is that the control shows a view of accounts from CRM. By hovering over the node, a user can immediately see if that account has an order going to it (by querying SAP) and what its shipping status is. Drilling down into an account shows additional detail about the account.
At any time, the control can use a different data set with the same visualization. By clicking the radio button below for file explorer, the control can render data from the file system, navigating from "c:\".
By clicking the Active Directory button, the control will bind to Active Directory,if available. Using the search box, a person's name can be entered and upon clicking the search button, that person will be found in Active Directory, with that person's direct reports listed below.
KNOWN ISSUES/FEATURE REQUESTS
--Doubleclicking on a node does not initiate opening the nodes beneath that person. For some reason, the event isn't bubbling up.
--Only one branch can be created. You should be able to create two branches, but that broke at some point and I couldn't figure out how to fix it.
--Sometimes the carousel spins rapidly to the left when spinning the carousel with the arrows. Not sure why.
--You can't navigate up from the root node, if there is something above it. That's not a bug, but a feature request.
If you fix any of these bugs, please let me know!
SOURCE CODE GUIDE
It is worth commenting that this source code was written against a build of WPF before WPF was completed. The code is pretty crusty. As such, there are techniques used that may seem unnatural. Much of this is a result of not all of WPF being completed when the project was initially written. For example, it doesn't use HierarchicalDataTemplate nor does it use an ItemsControl model in an optimal way. Nonetheless, there are some effective techiques employed worth digging into.
The HVC project is broken down into 5 different projects. Host is the Windows application. The hierarchical carousel control itself is a seperate project called XPHierarchicalCarousel. When creating the HVC, a datasource must be wired up that complies witTehh the IDataProvider as defined in the DataAdapter project. Within the DataAdapter project are the three data adapters. Creating a new data adapter involves implementing the IDataProvider interface for traversing nodes. The SAPConnector project and the ShippingServiceConnector project are for the purpose of the CRM adapter. The offline data is actual SAP data, serialized to .NET objects. The ShippingServiceConnector is a stub for a service that would contact a shipping web service.