TX Text Control .NET for WPF

InternalMargins Property

Property|Introduced in 12.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the distances, in twips, between the text frame's border line and the text. The property's value is an array of four variables specifying the distances in the following order: left, top, right and bottom. If a value is set to -1, it is not changed.

Syntax

public int[] InternalMargins { get; set; }

Examples

The following example applies bold formatting through the text frame's selection by using TextFrame.InternalMargins.

Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;

textFrame.InternalMargins = new int[] { 10 };
if (textFrame.InternalMargins != null)
{
    Console.WriteLine("Text Frame: Internal Margins is available.");
}