Does the WindowWorkspace break the best practices

Topics: CAB & Smart Client Software Factory
Mar 2, 2006 at 12:02 PM
originally posted by: dugjansen

A quick philosophical question about the WindowWorkspace. If I'm using the WindowWorkspace to provide a detailed data entry screen outside the shell with menus and toolbars etc, similar to a mail message in outlook. I need to add the menus to the window displaying the smartpart. The only way I have found has been to add the menus to the smartpart/user control itself.

Does the addition of menus and toolbars to a smartpart break with architecture guidelines proposed in CAB. As the smartpart can not be displayed in another workspace type without display the menus.

Mar 2, 2006 at 12:13 PM
originally posted by: ChrisHolmes

First question you have to answer is: will I be resuing this SmartPart form in another WorkSpace? If not, then you've got nothing to worry about.

If you are - or you can't anticipate, then keep in mind you can nest SmartParts. The Form portion (with input controls) could be one SmartPart (UserControl), and that could be contained on a parent SmartPart that has the MenuItems. Then if you needed to use the Form portion (child SmartPart) in another WorkSpace, you can use it directly, without it being implanted on the Parent SmartPart.

So, you have two ways to show the Form SmartPart: (best I can do without images)

1. WindowWorkSpace
--- ParentSmartPart (contains MenuItems)
--- FormSmartPart

2. DeckWorkSpace
--- FormSmartPart

Make sense?
Mar 2, 2006 at 9:36 PM
originally posted by: RolandLi

I don't think there is any difference between adding a button to the smartpart and adding a menu to the smartpart.
They are all controlls. You click on them, they invoke something.
It depends on how you use the them.