Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Reference
SmartTagBase Class
 Caption Property
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Tools Reference (Visual Studio Tools for Office)
SmartTagBase.Caption Property

Gets the name of the smart tag.

Namespace: Microsoft.Office.Tools
Assembly: Microsoft.Office.Tools.Common (in microsoft.office.tools.common.dll)

Visual Basic (Declaration)
Public ReadOnly Property Caption As String
Visual Basic (Usage)
Dim instance As SmartTagBase
Dim value As String

value = instance.Caption
C#
public string Caption { get; }

Property Value

The name of the smart tag.

The caption is displayed at the top of the smart tag menu.

The following code example demonstrates a handler for the Microsoft.Office.Tools.Excel.Action.Click event. The event handler uses the Caption property to display the name of the smart tag. This code example is part of a larger example provided for the Microsoft.Office.Tools.Excel.SmartTag class.

Visual Basic
' This action displays smart tag details.
Private Sub Action2_Click(ByVal sender As Object, _
    ByVal e As ActionEventArgs) Handles Action2.Click

    MsgBox("The current smart tag caption is '" & _
        Me.Caption & "'. The current smart tag type is '" & _
        Me.SmartTagType & "'.")
End Sub
C#
// This action displays smart tag details.
private void Action2_Click(object sender, ActionEventArgs e)
{
    MessageBox.Show("The current smart tag caption is '" + 
        this.Caption + "'. The current smart tag type is '" + 
        this.SmartTagType + "'.");
}
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker