TX Text Control .NET for WPF

Bold Property

Property
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 bold attribute of the selected text.

Syntax

public bool Bold { get; set; }

Examples

The following example formats the heading of a short document by using Selection.Bold.

textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;

selection.Bold = true;
if (selection.Bold)
{
    Console.WriteLine("Selection: Bold is enabled.");
}

Limitations

Runtime only.

Remarks

The property's default value is false.

The property returns its default value when the text selection contains multiple characters with mixed setting. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.