CAB: Use the Outlook Bar in your CAB applications17 Comments
In CAB Reference Implementation 2 (Global Bank Branch WorkBench), an IconTabWorkspace is introduced. The functionallity of the workspace is similar to Outlook’s bar, but it just displays icons (ToolStripButtons):
OutlookBar workspace showing the Mails smartpart Calendar module was selected and the smartpart has been shown Use of the splitter Show more/fewer buttons
You can download it from here.
Use it as every CAB Workspace! Add SmartParts using:
- void Show(object smartPart) and having your SmartPart implement ISmartInfoProvider or
- void Show(object smartPart, ISmartPartInfo smartPartInfo)
But take into account that in both cases you have to provide an OutlookBarSmartPartInfo, which will contain needed information to create the buttons.
OutlookBarSmartPartInfo has the following members in addition to those included in the SmartPartInfo base class:
- Icon: bitmap to be displayed in the button.
- (Optional) ImageTransparentColor: transparent color on the item’s icon for images that support transparency
- (Optional) EventTopicName: EventTopic that will be raised when clicking the button. This is useful, for example, when you need to update another workspace (much like what MS Outlook does).
Apart from these members, the OutlookBarWorkspace uses the Title property to set the button’s text.
This code is provided "AS IS" with no warranties, and confers no rights.
- The implementation of the stack strip is based on a sample written by Joe Stegman
- Mariano Szklanny helped writing the workspace implementation
- The office icons might be used only if you have a valid Microsoft Office license