TextBox.Document Property
Provides access to content of the text box.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v18.2.Core.dll
Declaration
Property Value
Type | Description |
---|---|
SubDocument | A SubDocument interface exposing the text box content. |
Remarks
The following code snippet illustrate how you can modify the text box content programmatically.
The following code inserts a paragraph and a picture from the main document into the text box. The TextBox.Document
property provides access to the text box content.
document.AppendText("Line One\nLine Two\nLine Three");
Shape myPicture = document.Shapes.InsertPicture(document.CreatePosition(15),
System.Drawing.Image.FromFile("beverages.png"));
myPicture.HorizontalAlignment = ShapeHorizontalAlignment.Center;
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Document property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.