TX Text Control .NET Server

RemoveInlineStyles Method

Method|Introduced in 24.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Removes all character based styles of the selected text so that all attributes are reset to the attributes of the paragraph style.

Syntax

public bool RemoveInlineStyles();

Return Value

The return value is true, if the operation was successful. Otherwise, it is false.

Examples

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

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

if (selection.RemoveInlineStyles())
{
    Console.WriteLine("Remove Inline Styles completed successfully.");
}