RibbonGroup.DialogLauncherClick Event
Occurs when the user clicks the Ribbon dialog launcher icon in the group.
Assembly: Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)
The Ribbon dialog launcher is a small icon that appears in the group. When the user clicks this icon, you can handle the DialogLauncherClick event to open a custom dialog box. By default, groups do not have a Ribbon dialog launcher. For more information, see How to: Add a Dialog Box Launcher to a Ribbon Group.
The following example shows how to add a dialog box launcher to a ribbon group and how to launch a custom dialog that enables users to choose advanced settings when they click on the RibbonDialogLauncher icon in the lower right corner of the RibbonGroup.
To run this code example, you must first perform the following steps:
-
Add a Ribbon (Visual Designer) item to an Office project.
-
Add a RibbonDialogLauncher to the default group as outlined in How to: Add a Dialog Box Launcher to a Ribbon Group.
-
If you are using Visual Basic, add a new Windows Form Dialog item to the project. If you are using C#, add a new Windows Form item and turn it into a dialog by adding an OK and Cancel button to the form and creating event handlers for the buttons' click events.
-
Set the (Name) property of the dialog to advancedSettingsDialog. You can customize the dialog by adding controls and setting more properties.
-
Add the DialogLauncherClick event handler to your code.
-
Place the contents of the following method into the DialogLauncherClick event handler.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.