RichEditBox.TextDocument Property


Gets an object that enables access to the text object model for the text contained in a RichEditBox.

 property RichEditTextDocument ^ TextDocument { RichEditTextDocument ^ get(); };
RichEditTextDocument TextDocument();
public RichEditTextDocument TextDocument { get; }
var richEditTextDocument = richEditBox.textDocument;
Public ReadOnly Property TextDocument As RichEditTextDocument

Property Value


An object that enables access to the text object model.

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)


The TextDocument property is equivalent to the Document property except for the type. The Document property is of type ITextDocument, and can be type cast to RichEditTextDocument. The TextDocument property, on the other hand, is already typed as RichEditTextDocument, so no type cast is necessary.

Applies to