Adding WorkITem to a SCSF Presenter

Topics: CAB & Smart Client Software Factory
Sep 17, 2006 at 12:27 PM
originally posted by: crickard62

I have a view with a ZoneWorkspace with DeckWorkspaces on either side (call them leftDeckWorkspace and rightDeckWorkspace) of the splitter. The Shell loads a OutlookBar based view (call it navBarView) in the leftDeckWorkspace and displays it. This works as designed.

Now I want to add a WorkItem to navBarView so that the navBarView can Show other views loaded in the rightDeckWorkspace. I built a WorkItem class (call it navBarWorkitem) to create and show the views in the rightDeckWorkspace. I am using the Smart Client Factory Presenter class which has a WorkItem reference built in. How do I associate a workItem object with the presenter? Or perhaps a better question is, how do I instantiate a navBarWorkitem object, assign it to the presenter's WorkItem property and run the navBarWorkitem object?

Is there an example of this anywhere?
Sep 20, 2006 at 9:56 AM
originally posted by: marianoszklanny

If you want to show a view on another Workspace when a button of the OutlookBar is clicked, you can make that button raise an event instead. Then, subscribe to it somewhere (e.g.: in a ModuleController) and in the subscriber method, show the view (or create a WorkItem if you need to).

To specify the event topic name, you have to set the EventTopicName of the OutlookBarSmartPartInfo.

Let me know if this helped.

Cheers,
Mariano Szklanny
http://staff.southworks.net/mariano