Friday, May 18, 2007

Design of Workspaces

Workspaces can show, hide, activate, or close a set of controls.

following types of workspaces:

  • WindowWorkspace
  • MdiWorkspace
  • TabWorkspace
  • DeckWorkspace
    The DeckWorkspace enables you to show and hide controls and SmartParts in an overlapped manner with no visible frame. Its implementation of the IWorkspace methods can show, hide, and close the SmartParts in a fashion similar to a deck of cards.
  • ZoneWorkspace
    The ZoneWorkspace enables you to create a tiled workspace layout. For example, you can create an Outlook-style user interface with a navigation zone on the left and two horizontal zones on the right by using multiple splitter controls.

All workspaces implement the IWorkspace interface that includes the following members:

  • Activate(Object smartPart). This method activates the SmartPart.
  • Show(Object smartPart). This method displays the passed SmartPart.
  • Show(Object smartPart, ISmartPartInfo smartPartInfo). This method displays the passed SmartPart providing hints in the SmartPartInfo for the concrete implementation to use.
  • Hide(Object smartPart). This method hides the SmartPart.
  • Close(Object smartPart). This method closes the SmartPart.
  • object ActiveSmartPart(). This method returns the currently active SmartPart in the Workspace, if one exists.
  • SmartParts. This property returns a collection of the SmartParts in this Workspace. You can use the collection to query for SmartParts that are contained in the Workspace.
  • event EventHandler SmartPartClosing. This event is raised when a SmartPart is closing. The WorkspaceCancelEventArgs can be used to cancel the event.
  • event EventHandler SmartPartActivated. This event occurs on SmartPart activation. The WorkSpaceEventArgs provides access to the activated SmartPart.

No comments: