Decoupling UIExtensionSites

Topics: CAB & Smart Client Software Factory
Aug 10, 2007 at 4:37 PM
I am relatively new to CAB and this site, so please excuse me if this topic has already been discussed.

In a CAB/WPF application that I am in the process of designing, I am planning on having a UI Extension Site where each module will place a control of some kind that will allow the module to be activated. I have not quite decided what type of control that will be (menu, button, etc.), but I am planning on using WPF a control template to define the actual control (to ensure a consistent style controllable in the shell application).

So, my question is this: What do you think of creating a non-control class that contains all of the pertinent info for creating the actual control and using that as the type for the UI Extension?

Specifically, I have a class that derives from UIElementAdapter that uses an ObservableCollection as the storage. The collection used is passed into the constructor and is a part of the shell form's DataContext. I the sell form, the collection is used as the ItemsSource for the templated controls.

Does this method make any sense, or am I just doing things the hard way?