TXTextControl.WPF.TextControlDocument Class

An object of the WPF.TextControlDocument class represents a document and is part of the template of a WPF.TextControl. It is a System.Windows.Controls.Canvas element and its size is exactly the size of the document. The document is contained in a System.Windows.Controls.ScrollViewer which is responsible for displaying the document's visible part.

Introduced: 22.0.

Syntax

[C#]
public class TextControlDocument : System.Windows.Controls.Canvas
[Visual Basic]
Public Class TextControlDocument
  Inherits System.Windows.Controls.Canvas

Example

To obtain the TextControlDocument object in a WPF.TextControl the following code can be used:

[C#]
TextControlDocument document = textControl1.Template.FindName("TXPART_Document", textControl1) as TextControlDocument;
[Visual Basic]
Dim document As TextControlDocument = TryCast(textControl1.Template.FindName("TXPART_Document", textControl1), TextControlDocument)

See Also