| BCGControlBar for .NET > How To > Customization |
How To
... display customize dialog
Add "Customize..." toolbar menu button. Take its ID and copy it to CommandBarManager.CustomizeButtonID property. The designer generates default handler for CommandBarManager.ExecuteCommand, which handles all clicks on customize button disregard where the button is located - on library context menu, quick customize button or user-defined toolbar.
To show Customize dialog for a particular command bar manager you just need to call CommandBarManager.ShowCustomizeDialog method.
... set the allowed number of user-defined toolbars (user-defined toolbars are created by the library when user clicks "New" button in "Toolbars" tab of Customize dialog)
Set UserToolbarCount property of CommandBarManager component to the desired number of user-defined toolbars.
... add commands, which are not present neither in toolbars, nor in menus to Customize dialog.
Select CommandBarManager component, select StandAloneButtons property and open ToolbarButton Collection Editor dialog. Add a button and set its properties (CommandName, Text, images and so on). Open Command Editor (double click on CommandBarManager component, or select CommandBarManager and click Edit Commands link on the Properties Window). Create a category in Add New Category group if the desired Category has not been created yet. Locate standalone command in Commands tree. The command is marked by special symbol "Command has StandAlone button" (see legend at the bottom of dialog). Drag the command to desired Category. Close the dialog.Note. Currently you can't add event handlers for standalone buttons using designers. You need to subscribe to these events manually, or insert processing to OnExecuteCommand handler generated by designer for command bar manager.
... setup "Change Button Image" image palette displayed from the context menu in Customize mode