Freigeben über


XmlMappedRange.PrefixCharacter Property

Gets the prefix character for the XmlMappedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Syntax

'Declaration
ReadOnly Property PrefixCharacter As Object
Object PrefixCharacter { get; }

Property Value

Type: System.Object
The prefix character for the XmlMappedRange control.

Remarks

The prefix is returned as a string. Attempting to cast the object returned to a char results in an invalid cast exception.

If the TransitionNavigKeys property is false, this prefix character is ' for a text label, or blank. If the TransitionNavigKeys property is true, this character is ' for a left-justified label, " for a right-justified label, ^ for a centered label, \ for a repeated label, or blank.

Examples

The following code example uses the PrefixCharacter property to display the prefix character for an XmlMappedRange. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

Private Sub DisplayPrefixCharacter()
    If CStr(Me.CustomerLastNameCell.PrefixCharacter) = "" Then
        MsgBox("The prefix character is blank.")
    Else
        MsgBox("The prefix character is: " & _
            Me.CustomerLastNameCell.PrefixCharacter)
    End If 
End Sub
private void DisplayPrefixCharacter()
{
    if ((string)this.CustomerLastNameCell.PrefixCharacter == "")
    {
        MessageBox.Show("The prefix character is blank.");
    }
    else
    {
        MessageBox.Show("The prefix character is: " +
            this.CustomerLastNameCell.PrefixCharacter);
    }
}

.NET Framework Security

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace