RemoveInlineStyles Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK 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();Public Function RemoveInlineStyles() As BooleanReturn 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.");
}textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection
If selection.RemoveInlineStyles() Then
Console.WriteLine("Remove Inline Styles completed successfully.")
End If