Click here to Skip to main content
11,410,379 members (57,019 online)
Click here to Skip to main content

Outlook 2003 Style Navigation Pane

, 8 Nov 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
Outlook 2003 Style Navigation Pane (Almost 2007 Style)
Screenshot - Outlook_Navigation_Pane.JPG


This control has been developed according to Microsoft Office 2003 controls. Most of the properties are included. However, there is no support yet for the "Design Time" property. This control contains five sub-controls:

  1. Title: This section is at the top of the control. The property describes the control and is also the visible control indicated on the button.
  2. Title explanation: This section is under the title info, which should hold long info rather than the title info. If the title was not defined, this control uses the title. Visible control is indicated on the button.
  3. Related control: This control shows when the button is selected and is not moveable. This property has to indicate on the control when the control is added. Furthermore, this control is shown on the button. If this control was not added on the button, the control will shown only a panel.
  4. Buttons: This object is dependent on the control. Almost all properties are contained in this control.
  5. Carrying panel: The buttons can add onto the carrying panel. If this situation is not possible, the buttons will be added on the menu.

NavigateBar Control

This navigate bar must be used in a carrier panel. It will be deployed on the included control. All of the controls specified above come up within this control. Briefly:


  • NavigateBarButtons: Collection that carries NavigateBarButton controls. New button can be added here.
  • NavigateBarButtonHeight: Every new button uses this value for height info.
  • NavigateBarDisplayedButtonCount: Maximum number of buttons can be added on the panel. Default is all buttons if it is not set.
  • SelectedButton: Holds selected or picked-out button info.
  • NavigateBarColorTable: Contains color settings for Panel and Sub-controls. System defaults valid when undefined. It is possible to customize.
  • SaveAndRestoreSettings: Each application saving a different location. For save and restore, you must set NavigateBarButton.KEY values. Default settings result in file saves in XML file format in the %APPDATA%\AppExeFileName folder. You can set any disk location and file name.
  • IsCollapsible: Is it a collapsible pane? Default is true.
  • IsShowCollapseButton: Show collapse button on the caption band.
  • IsCollapsedMode: Get collapsible mode state.
  • IsShowCollapsibleScreen: If pane width is smaller than minimum size, is it displayed as a collapsible screen?
  • IsUseRTLforButtons: Use RightToLeft for buttons.
  • IsUseRTLforMenus: Use RightToLeft for context menus.
  • IsCollapsibleScreenShowNow: Is it displayed as a collapsible screen?
  • IsCollapseScreenShowOnButtonSelect: Is it shown as a collapsible screen when button is clicked?
  • CollapsibleScreenWidth: Collapsible screen width.
  • CollapsibleWidth: Required panel width for collapsible mode.
  • RelatedControl: If Button.RelatedControl is empty, then display this control.
  • OverFlowPanelHeight: Get or Set overflow panel height.
  • DisplayedButtonCount: Get or Set displayed button count in panel.
  • AlwaysUseSystemColors: Get or Set; if always use system colors, set as true.


  • ChangeCollapseMode: If collapsible, then changes the collapse mode.
  • ChangeButtonPosition: Sets new position in panel and collection for button.
  • ShowCollapseScreen: If collapsed mode, then shows collapse screen.
  • HideCollapseScreen: If collapsed mode, then hides collapse screen.
  • RunMenuOptionsDialog: Open Navigatebar "Menu Option" form.


  • OnNavigateBarButtonHeightChanged: Triggers when button height is changed. Displays old and new values.
  • OnNavigateBarButtonAdded: Triggers when new button is added. Displays new button's info.
  • OnNavigateBarButtonRemoved: Triggers when existing button is removed. Displays removed button's info.
  • OnNavigateBarButtonSelecting: Triggers when a button is selecting.
  • OnNavigateBarButtonSelected: Triggers when a button is selected. Displays selected button's info.
  • OnNavigateBarDisplayedButtonCountChanged: Triggers when displayed button count is changed.
  • OnNavigateBarCollapseModeChanged: Triggers when collapse mode is changed.
  • OnNavigateBarColorChanged: Triggers when the color table is changed.

NavigateBarButton Control

This contains the button info that is added into the panel. The button is the main object of control and almost all properties are saved on it. Briefly:


  • Caption: This is the text info on the button and also its panel title. It will also be used for ToolTipText if ToolTipText has not been set.
  • CaptionDescription: Description of the panel title.
  • RelatedControl: The control that displays on the panel when the button is selected. Panel with notification message will display when it is undefined.
  • Key: Each one is a unique value in the collection. This value is used for save and restore.
  • Image: Holds picture info. 24x24 size is recommended. This picture will be used when it is disabled. It is an alternative to use. When this picture does not exist, one default picture will be added in OverFlowPanel.
  • MouseOverImage: Picture info when mouse points on it. Image info will be used when it is undefined.
  • SelectedImage: Picture info when it is selected. Image info will be used when it is undefined.
  • IsSelected: Saves if button is selected or not.
  • IsDisplayed: Saves if button display is in the panel or not.
  • IsAlwaysDisplayed: Don't change the IsDisplayed state. Always shows NavigateBarButton.
  • IsShowCaption: Saves display of title on panel or not when the button selected.
  • IsShowCaptionDescription: Sets display of panel description when the button is selected.
  • Font: Button's font info.
  • ForeColor: Button's font color info.
  • ToolTipText: The text info that is shown when button and overflow panel are not big enough.
  • DefaultButtonHeight: Button's default height info. Defined as static.
  • MinimumButtonHeight: Minimum height info that the button can have. Defined as static.
  • CollapsedScreenWidth: Collapse screen width for this button.
  • IsShowCollapseScreenCaption: Show caption band on collapse screen.


  • PerformClick: Run button's selected event manually.


  • OnNavigateBarButtonSelected: Triggers when a button is selected. First, it kicks off here and then kicks off the part in the main NavigationBar.
  • OnNavigateBarButtonCaptionChanged: Triggers when the button title info is changed. Displays old and new values.
  • OnNavigateBarButtonCaptionDescriptionChanged: Triggers when the button title description info is changed. Displays old and new values.
  • OnNavigateBarButtonDisplayChanged: Triggers when the button's display settings info in the panel is changed. Displays old and new values.

Using the Code

Some simple navigation pane code:

// Create a Navigation Pane
NavigateBar navigationPane = new NavigateBar();

// Create a Navigation Pane Button
NavigateBarButton nvbMail = new NavigateBarButton();
nvbMail.Caption = "Mail";
nvbMail.CaptionDescription = "Mail Folders";
nvbMail.Image = Properties.Resources.Mail24;
nvbMail.Key = "MAIL";
nvbMail.RelatedControl = new MyCustomControl();
nvbMail.CollapsedScreenWidth = 160;

// Add Buttons
navigationPane.NavigateBarButtons.Add(new NavigateBarButton("Calendar"));

// Set Optional Properties
navigationPane.NavigateBarDisplayedButtonCount = 3; // Show maximum 3 button
navigationPane.NavigateBarColorTable = NavigateBarColorTable.Office2007Blue;
navigationPane.IsShowCollapsibleScreen = true;


  • 11.07.2007: Version 2.6.4
    • Added: If deactivate or change application, close collapse screen.
    • Improved: Collapse screen show method.
    • Fixed: Splitter resize problem.
  • 08.31.2007: Version 2.6.3
    • Improved: Collapse button click.
    • Removed: Unused methods from NavigateBarHelpers.cs.
    • Fixed: If unsave setting, then changing button position.
    • Fixed: Button's right click menu closing, then paint.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Muhammed Şahin
Software Developer
Turkey Turkey
No Biography provided

Comments and Discussions

QuestionSaving settings of menubar PinmemberJan Alderliesten28-Dec-13 9:05 
QuestionShow/Hide OverflowPanel and Grip. Pinmemberpriyamtheone19-Oct-12 6:24 
Good Job- Kudos!

BTW, at times I come upon a situation where it is needed to hide the OverflowPanel and the Grip. So, I would like to know if it's possible for the NavigateBar to have a property like ShowOverflowPanel that will hide/show the OverflowPanel and the Grip? If yes, then how would I be doing it? A little help please!

GeneralMy vote of 5 Pinmembermail_main21-Apr-12 2:20 
BugLittle typing error Pinmemberpippo pioppo19-Mar-12 4:42 
GeneralClearing all navigatebar buttons Pinmemberingbabic23-May-11 6:40 
GeneralMy vote of 5 PinmemberGiangySan22-May-11 1:45 
GeneralMy vote of 5 PinmemberXmen W.K.26-Apr-11 17:24 
GeneralReference Error PinmemberSnowman9031-Mar-11 2:12 
GeneralRe: Reference Error PinmemberMuhammed Şahin31-Mar-11 4:05 
GeneralRe: Reference Error PinmemberSnowman9031-Mar-11 20:24 
GeneralRe: Reference Error PinmemberSnowman9031-Mar-11 23:49 
GeneralVS 2008 CRASH Pinmemberrussish12-Apr-10 6:32 
GeneralYour control not go into ToolStripContainer Pinmemberamostafa8416-Mar-10 0:18 
GeneralMessage Automatically Removed PinmemberJeans.zhou15-Mar-10 16:08 
QuestionHow I can reorder buttons. Pinmemberrussish26-Oct-09 10:49 
AnswerRe: How I can reorder buttons. PinmemberMuhammed Şahin26-Oct-09 12:02 
GeneralRe: How I can reorder buttons. Pinmemberrussish26-Oct-09 20:14 port Pinmemberatarrabi24-Sep-09 10:30 
GeneralRe: port PinmemberIker eL_FRuTeRo19-Oct-09 4:06 
GeneralIn Vb.NET Pinmemberatarrabi17-Sep-09 2:48 
QuestionHow about new version? PinmemberRadu Martin21-Aug-09 3:14 
AnswerRe: How about new version? PinmemberMuhammed Şahin26-Oct-09 21:41 
GeneralNice PinmemberRadu Martin16-Aug-09 21:58 
GeneralA little error PinmemberMember 101703723-Jul-09 6:18 
GeneralNavigation Button Pinmemberluisxvarg28-May-09 5:08 
Questioncan i use this in MS Access 03 or 07? PinmemberABCJB7-May-09 1:24 
Questionhow can we add sub menus to each tab menu Pinmemberbeesan30-Mar-09 20:37 
Answer[Dito] how can we add sub menus to each tab menu Pinmemberstripmitz1-Apr-09 5:03 
GeneralRe: [Dito] how can we add sub menus to each tab menu Pinmemberbeesan1-Apr-09 8:48 
GeneralRe: [Dito] how can we add sub menus to each tab menu Pinmemberstripmitz1-Apr-09 9:07 
GeneralRe: [Dito] how can we add sub menus to each tab menu Pinmemberbeesan1-Apr-09 9:28 
AnswerRe: how can we add sub menus to each tab menu PinmemberMuhammed Sahin1-Apr-09 7:01 
GeneralRe: how can we add sub menus to each tab menu Pinmemberbeesan1-Apr-09 8:42 
AnswerRe: how can we add sub menus to each tab menu PinmemberAKDM29-Apr-09 3:06 
GeneralRe: how can we add sub menus to each tab menu Pinmemberenexooone17-Jun-10 0:14 
GeneralCongratulations & Images Improvements PinmemberIker eL_FRuTeRo10-Feb-09 23:25 
GeneralSupport RTL PinmemberMahdi Manavi8-Feb-09 2:50 
GeneralRe: Support RTL PinmemberMuhammed Sahin10-Feb-09 23:39 
GeneralNavigation Pane Control Pinmember_WinBase_13-Nov-08 6:33 
GeneralExcellent control, couple of questions PinmemberEpoque8-Nov-08 11:47 
General[Message Removed] PinmemberKatekortez25-Oct-08 10:12 
QuestionOverFlowPanel Pinmembertigor17-Oct-08 7:36 
AnswerRe: OverFlowPanel PinmemberMuhammed Sahin18-Oct-08 6:18 
GeneralSuggested Improvements PinmemberStuart Jeffery15-Sep-08 1:12 
QuestionIs Outlook 2003 Style Navigation Pane tied to windows themes ? Pinmembervinutha kempanna29-Jul-08 2:46 
AnswerRe: Is Outlook 2003 Style Navigation Pane tied to windows themes ? Pinmemberynxuxiang20-Dec-08 22:14 
QuestionLogout/Shutdown message PinmemberMassimo C3-Jul-08 1:51 
GeneralNot work with Unicode Pinmemberchanty_sothy18-Jun-08 23:44 
GeneralRe: Not work with Unicode PinmemberMuhammed Sahin18-Jun-08 23:58 
QuestionAnyway to do Drag N Drop? PinmemberMember 293817514-May-08 13:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150414.5 | Last Updated 8 Nov 2007
Article Copyright 2007 by Muhammed Şahin
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid