The UiListBar is a container for ListBarGroups which can host UiItemsView panels
to provide grouped lists of items or host any other control.
This walkthrough illustrates how to set up a basic Windows XP Outlook-style ListBar
panel.
This walkthrough is split up into the following activities:
- Adding a Windows Form to a Visual Studio project
- Adding the UiListBar and UiListBarGroups
- Adding an imagelist and the first UiItemsView panel
- Adding a second imagelist and a second UiItemsView panel
- Adding a third UiItemsView panel
- Setting the HostedControl properties of the UiListBarGroups
- Running the project
When you have completed this walkthrough, you will have an application that looks
similar to the following.

Adding a Windows Form to a Visual Studio project
To add a Windows Form to your project
- Open a new project in Visual Studio.
- Click on Project > Add > Add Windows Form.
- Click Open.
Adding the UiListBar and UiListBarGroups
To add the UiListBar and UiListBarGroups
- Drag a UiListBar to Form1.
- Change the Name property to lbOutlook.
- Set the FlatStyle property to LightThreeD.
- Open the UiListBarGroup Collection by clicking the ellipsis
for the Groups (Collection) property.
- Add three Groups to the collection and change the Text property
for each one, respectively, to the following: Outlook Shortcuts,
My Shortcuts, and Other Shortcuts.
- Click OK to close the UiListBarGroup Collection Editor.
- Set the Spacing property for X and
Y to 2.
- Set the TextAlignment property to Center.
Adding an imagelist and the first UiItemsView
To add an imagelist and the first UiItemsView
- Drag a Windows Forms imagelist to Form1. Change the Name
property to ilOutlookLarge. Change the ImageSize
property for Width to 32 and for Height
to 32.
- Add 10 32 x 32 images to ilOutlookLarge for: Outlook
Today, Inbox, Calendar, Contacts, Tasks, Notes,
Deleted Items, My Computer, My Documents, and My Network
Places (see panels 1 and 3 in the walkthrough screenshot above).
- Drag and drop a UiItemsView from the appropriate toolbox to Form1 and change
the Name property for the UiItemsView panel
to ivOutlookShortcuts.
- Change the DockPadding property for All
to 5.
- Change the FlatStyle property for ivOutlookShortcuts
to Flat.
- Set the ImagePosition property to Above,
the ItemAlignment property to Center, and the
ItemHighlight property to ImageOnly.
- Set the LargeIcons property to True and
the LargeImageList property to ilOutlookLarge.
- Open the UiItem Collection Editor by clicking the ellipsis
for the Items (Collection) property. Add the following items
with corresponding Text and LargeImageIndex
properties to the collection:
- Outlook Today--0
- Inbox--1
- Calendar--2
- Contacts--3
- Tasks--4
- Notes--5
- Deleted Items--6
- Click OK to close the UiItem Collection Editor.
- Set the Spacing property for Y to 5.
Adding a second imagelist and a second UiItemsView
To add a second imagelist and a second UiItemsView
- Drag a Windows Forms imagelist to Form1. Change the Name
property to ilOutlookSmall.
- Add five 16 x 16 images to ilOutlookSmall for: Drafts,
Outbox, Sent Items, Journal, and Outlook Updates (see
panel 2 of the walkthrough screenshot above).
- Drag a UiItemsView panel from the appropriate toolbox to
Form1 and change the Name property for the UiItemsView
panel to ivMyShortcuts.
- Change the DockPadding property for All
to 5.
- Change the FlatStyle property to Flat.
- Set the ItemHighlight property to ImageOnly.
- Set the SmallImageList property to ilOutlookSmall.
- Open the UiItem Collection Editor by clicking the ellipsis
button for the Items (Collection) property.
- Add the following items with corresponding Text and SmallImageIndex
properties to the collection:
- Drafts--0
- Outbox--1
- Sent Items--2
- Journal--3
- Outlook Updates--4
- Click OK to close the UiItem Collection Editor.
Adding a third UiItemsView
To add a third UiItemsView
- Drag a UiItemsView panel from the appropriate toolbox to
Form1 and change the Name property for the UiItemsView
to ivOtherShortcuts.
- Change the DockPadding property for All
to 10.
- Change the FlatStyle property to Flat.
- Set the ImagePosition property to Above,
the ItemAlignment property to Center, and the
ItemHighlight property to ImageOnly.
- Set the LargeIcons property to True
and the LargeImageList property to ilOutlookLarge.
- Open the UiItem Collection Editor by clicking the ellipsis
button for the Items (Collection) property.
- Add the following items with corresponding Text and LargeImageIndex
properties to the collection:
- My Computer--7
- My Documents--8
- Favorites--9
- Click OK to close the UiItem Collection Editor.
Setting the UiListBarGroups HostedControl properties
To set the UiListBarGroups HostedControl properties
- Click on lbOutlook to select it.
- Open the UiListBarGroup Collection Editor by clicking on
the ellipsis for the Groups (Collection) property.
- Select the "Outlook Shortcuts" group and set the HostedControl
property to ivOutlookShortcuts.
- Select the "My Shortcuts" group and set the HostedControl
property to ivMyShortcuts.
- Select the "Other Shortcuts" group and set the HostedControl
property to ivOtherShortcuts.
- Click OK to close the UiListBarGroup Collection Editor.
Running the project
To run the project
- Press F5 to run the project.
Walkthrough: UiItemsView | Walkthrough: UiTabView | Walkthrough: UiTaskBar
Copyright © 2002-2006 Data Dynamics, Ltd. All rights reserved.