Actions Pane Help Label Sample
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Actions Pane Help Label Sample

Download sample

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005


    Visual Studio Team System

  • Microsoft Office 2003

This sample includes a control that provides dynamic, context sensitive help on an actions pane for a document that contains XML-mapped regions. The control automatically associates itself with the XML schema and uses schema annotations as the help text. When a user places the insertion point in a region containing a given XML node, the control displays the associated region name and annotation text. The developer can use the control’s properties to indicate what happens when a given region does not have annotation text.

The control has four properties that you can set to determine what the control displays if there is no annotation text. These properties appear in the Properties window, in a section called Content.


Specifies whether the control should display the annotation text of the closest ancestor region if one is not specified in the selected region.


Determines whether the element type or element name annotation is displayed.


The text the control displays if there is no annotation.


Toggles whether the name of the region appears in the Help Label control.

There is one solution with three projects in the Help Label sample: a control library project, a Microsoft Office Word 2003 Application project, and a Microsoft Office Excel 2003 Application project. The Word and Excel projects demonstrate the control in use. As you click in different areas of the document or worksheet, the Help Label displays text taken from the associated XML schema region.

Security noteSecurity Note

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

For information about installing the sample project on your computer, see How to: Download Sample Files in Help Topics.

To run this sample

  • Press F5.


This sample demonstrates how to create a user control and incorporate it into a project, and how to respond to events within XML-mapped regions.

See Also

© 2015 Microsoft