Workspaces not showing up in toolbox

Topics: CAB & Smart Client Software Factory
Jan 5, 2007 at 5:31 PM
I've hit a snag where a couple of the workspace controls don't show up in the toolbox for me. Namely, the WindowWorkspace and MDIWorkspace. Does anyone have any thoughts on why this might be?
Jan 5, 2007 at 5:37 PM
I should note that I have successfully added other controls from Microsoft.Practices.CompositeUI.WinForms.dll by selecting "Choose Items...". For example, the DeckWorkspace DOES show up in the toolbox, just not the WindowWorkspace, which is the one I really need... thanks
Jan 5, 2007 at 8:31 PM
The MDI and Window Workspace classes don't derive from control classes. Therefore, you have to write code explicitly to create them.

For what it's worth, the two most common types of Workspaces used are Deck and Tab.

When our department learned this information, we decided to use only those two workspaces and are building our application based on that.

Regardless, this should at least help you get started:
You'll want to declare a class level variable of type MdiWorkspace:
private MdiWorkspace myWorkspace;

Then, in your InjectionConstructor, set the value of this variable:
myWorkspace = new MdiWorkspace(this);

Then, add it to the WorkItems Collection:

From there, I'm not really sure what to do :P

Hope that at least helps a little.