ResetToParagraph Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
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);Public Sub ResetToParagraph(attributes As InlineStyle.Attributes)Parameters
| Parameter | Description |
|---|---|
| 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.");Dim inlineStyle As New InlineStyle("Emphasis")
textControl.InlineStyles.Add(inlineStyle)
inlineStyle.ResetToParagraph(InlineStyle.Attributes.FontName)
Console.WriteLine("Inline Style is ready for use.")