TX Text Control .NET for WPF

BaseStyle Property

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

Description

Gets the FormattingStyle which is the base style of this style. If this style is the TextControl's root style this property returns null. The property's value can be either a ParagraphStyle or an InlineStyle.

Syntax

public FormattingStyle BaseStyle { get; }

Examples

The following example creates a reusable emphasis style and adds it to the document by using FormattingStyle.BaseStyle.

FormattingStyle formattingStyle = new InlineStyle("Emphasis");

Console.WriteLine($"Base Style: {formattingStyle.BaseStyle}");
Console.WriteLine("Formatting Style is ready for use.");

textControl.InlineStyles.Add((InlineStyle)formattingStyle);

Limitations

Read only.