TX Text Control .NET for WPF

CaretWidth Property

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

Description

Gets or sets the width of the caret in pixels. If this property is zero, the width is set to its default value which is the system-defined window border width.

Syntax

public int CaretWidth { get; set; }

Examples

The following example uses TextControl.CaretWidth to configure caret width as part of the text control workflow. The configured value is checked before the workflow continues.

textControl.CaretWidth = 100;
Console.WriteLine($"Caret Width used by Text Control: {textControl.CaretWidth}");

Limitations

The maximum width is 255 pixels.