Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
 Actions Pane Help Label Sample
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0)
Actions Pane Help Label Sample

Updated: November 2007

Note:

This sample runs only in Microsoft Office Excel 2007 and Microsoft Office Word 2007.

This sample includes a control that provides dynamic, context-sensitive help on an actions pane for a document or worksheet 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 that contains an 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 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.

UseAncestorAnnotation

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

AnnotationType

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

PlaceholderText

The text the control displays if there is no annotation.

ShowLocationName

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 Word document project, and an Excel workbook project. The Word and Excel projects demonstrate how to use the control. As you click in different areas of the document or worksheet, the Help Label displays text that is taken from the associated XML schema region.

Security Note:

This sample code is intended to illustrate a concept, and it shows only the code that is relevant to that concept. It may not meet the security requirements for a specific environment, and it should not be used exactly as shown. We recommend that you add security and error-handling code to make your projects more secure and robust. Microsoft provides this sample code "AS IS" with no warranties.

For information about how to install the sample project on your computer, see How to: Install and Use Sample Files Found in Help.

Download sample

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 in XML-mapped regions.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker