TX Text Control .NET for WPF

ResetToParagraph Method

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

Description

Resets one or more of the style's attributes to its default value which is the same value as defined for the surrounding paragraph. Text formatted through an inline style has all the attributes defined through the surrounding paragraph except the attributes explicitly defined through the inline style.

Syntax

public void ResetToParagraph(InlineStyle.Attributes attributes);

Parameters

ParameterDescription
attributes

Specifies one or more attributes to reset. It can be a bitwise combination of values from the Attributes enumeration contained in this class.

Examples

The following example creates and configures a reusable inline style for the document by using InlineStyle.ResetToParagraph.

InlineStyle inlineStyle = new("Emphasis");
textControl.InlineStyles.Add(inlineStyle);

inlineStyle.ResetToParagraph(InlineStyle.Attributes.FontName);
Console.WriteLine("Inline Style is ready for use.");