Version

Format a Tool’s Description on the Ribbon’s Application Menu

{Warning}

In the topic Add a Tool to the Tool Area of the Ribbon’s Application Menu, we discussed how to add a tool to the Application Menu, but not how to format the description of that tool. Each tool has a property in their SharedProps object called DescriptionOnMenu . This property is set with a string. The string can be regular text or formatted text. You will see this string display directly under the caption, which you can set using the Caption property off the SharedProps object. The DescriptionOnMenu property supports all the functionality that the Value property of the FormattedLinkEditor supports. For more information on how to format the text in the DescriptionOnMenu property, see Formatting Text and Hyperlinks and the Style Attribute.

The following code demonstrates how to format a tool’s description when it displays on the Ribbon’s Application menu.

Note
Note

This example assumes that you have read Add a Tool to the Tool Area of the Ribbon’s Application Menu and are using the same example).

Image of formatted text in Application Menu items

In Visual Basic:

NewMenuItem.SharedProps.DescriptionOnMenu = _
  "<p style='text-smoothing-mode:AntiAlias'>Create a new document.</p>"

In C#:

newMenuItem.SharedProps.DescriptionOnMenu =
  "<p style='text-smoothing-mode:AntiAlias'>Create a new document.</p>";