XMLNode.PlaceholderText Property

Definition

Gets or sets the text displayed for an XMLNode control that contains no text.

public:
 property System::String ^ PlaceholderText { System::String ^ get(); void set(System::String ^ value); };
public string PlaceholderText { get; set; }
member this.PlaceholderText : string with get, set
Public Property PlaceholderText As String

Property Value

The text displayed for an XMLNode control that contains no text.

Examples

The following code example uses the PlaceholderText property to set the default text of an XMLNode, and then sets the ShowXMLMarkup property to 0 (zero) so that the XML tags are not displayed. This example assumes that the current document contains an XMLNode named CustomerFirstNameNode.

private void SetPlaceholderText()
{
    int WordFalse = 0;
    this.CustomerFirstNameNode.PlaceholderText = "Enter first name here";
    this.CustomerFirstNameNode.OwnerDocument.ActiveWindow.View.ShowXMLMarkup = 
        WordFalse;
}
Private Sub SetPlaceholderText()
    Dim WordFalse As Integer = 0
    Me.CustomerFirstNameNode.PlaceholderText = "Enter first name here"
    Me.CustomerFirstNameNode.OwnerDocument.ActiveWindow.View.ShowXMLMarkup = _
        WordFalse
End Sub

Remarks

Placeholder text is displayed in Microsoft Office Word only when the Show XML tags in the document check box in the XML Structure task pane is cleared. The Show XML tags in the document check box corresponds to the ShowXMLMarkup property.

Applies to