RemoveFormatting 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
Resets all character based formatting attributes of the selected text to its default values. If nothing or more than one paragraph is selected, all paragraph based formatting attributes are also reset.
Syntax
public bool RemoveFormatting();Public Function RemoveFormatting() 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.RemoveFormatting.
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;
if (selection.RemoveFormatting())
{
Console.WriteLine("Remove Formatting completed successfully.");
}textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection
If selection.RemoveFormatting() Then
Console.WriteLine("Remove Formatting completed successfully.")
End If