Outlook Treeview Example

Topics: CAB & Smart Client Software Factory
Jan 19, 2007 at 1:21 PM

I like to use MS Outlook to explain SmartClient and CAB patterns. Everyone (almost anyway) uses Outlook and knows how it works.

Now, in Outlook, running in "Mail" view mode, the left navigator shows a treeview. What strategy could I use to treat that TreeView like an UIExtensionSite or something like that?

From different modules, I would like to be able to add/update the content to/from that TreeView?

To lean towards an "interface/disconnected" approach, I was thinking of using a local data store approach.

The interface would display the TreeView according to that store, and the modules would populate that store.

Is the store a service? Is it part of the infrastructure or a separate module?

The separate module has the advantage of becoming reusable framework.

A feature to keep in mind would be the ability to save to disk that store for fast app start.

Any words of wisdom?

Jan 19, 2007 at 7:47 PM
Take a look at this


You can mix the outlook bar with UIExtensionSites in a way that the smartpart that you show in the outlookbarworkspace allow you to register UIExtensionSites

Let me know if this helps

Jan 22, 2007 at 1:14 AM
You will have to write a TreeView Adapter. You can then add the Tree nodes in the app.config and they will have a command associated with it. Check out the integrated Desktop sample from MSDN. Don't bother compiling this, I've tried everything and there's a huge amount of missing assembly references. This will give you insights on how the Treeview is extended into a UI Extension site.


Hopefully that helps,
Jan 22, 2007 at 5:32 PM
"Is the store a service? Is it part of the infrastructure or a separate module?"

I am debating that question myself. I can't find a clear answer in the documentation. For now, I plan to create a foundation module to provide data access functionality.

Jan 24, 2007 at 3:19 PM
Greetings. codeplex beings.
My approach was to create a subclassed version of the treeview. say, navigatortreeview
and maintain a list of eventtopicnames in it's instance.
Whenever a module needs to put nodes on the tree. It fires a global event. EventPublication. passing a custom object containing info like eventopic name, title, description, icon etc. (a bit like a smartpartinfo).
The navigation module now through an eventsubscription takes this and creates a node with the specified info. When the node is clicked. retrieve the eventtopic name from the internal list of eventtopics(node title is the key) and fire! it.(it is expected that the module will have an eventsubscription that handles this in anticipation).

Hope this helps.