![]() |
Enterprise Systems »
Office Development »
Outlook
Intermediate
License: The Code Project Open License (CPOL)
Outlook 2003 Style Navigation PaneBy Muhammed ŞahinOutlook 2003 Style Navigation Pane (Almost 2007 Style) |
C# 2.0, Windows, .NETVS2005, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
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:
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. 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. 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(nvbMail);
navigationPane.NavigateBarButtons.Add(new NavigateBarButton("Calendar"));
// Set Optional Properties
navigationPane.NavigateBarDisplayedButtonCount = 3; // Show maximum 3 button
navigationPane.NavigateBarColorTable = NavigateBarColorTable.Office2007Blue;
navigationPane.IsShowCollapsibleScreen = true;
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 8 Nov 2007 Editor: Genevieve Sovereign |
Copyright 2007 by Muhammed Şahin Everything else Copyright © CodeProject, 1999-2009 Web20 | Advertise on the Code Project |