TX Text Control .NET for Windows Forms

BorderWidth Property

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

Description

Gets or sets the width, in twips, of a text frame's border line. To alter the distance between the border line and the text, use the InternalMargins property. If this property is set to zero, the text frame has no border line.

Syntax

public int BorderWidth { get; set; }

Examples

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

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

textFrame.BorderWidth = 100;
Console.WriteLine($"Border Width used by Text Frame: {textFrame.BorderWidth}");