Aracılığıyla paylaş


XmlMappedRange.PrefixCharacter Property

Definition

Gets the prefix character for the XmlMappedRange control.

public:
 property System::Object ^ PrefixCharacter { System::Object ^ get(); };
public object PrefixCharacter { get; }
member this.PrefixCharacter : obj
Public ReadOnly Property PrefixCharacter As Object

Property Value

The prefix character for the XmlMappedRange control.

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 void DisplayPrefixCharacter()
{
    if ((string)this.CustomerLastNameCell.PrefixCharacter == "")
    {
        MessageBox.Show("The prefix character is blank.");
    }
    else
    {
        MessageBox.Show("The prefix character is: " +
            this.CustomerLastNameCell.PrefixCharacter);
    }
}
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

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.

Applies to