Apply 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
Applies all set attributes of the style to the current document.
Syntax
public bool Apply();Public Function Apply() As BooleanReturn Value
The return value is true, if all attributes could be set. Otherwise it is false.
Examples
The following example creates a reusable emphasis style and adds it to the document by using FormattingStyle.Apply.
FormattingStyle formattingStyle = new InlineStyle("Emphasis");
if (formattingStyle.Apply())
{
Console.WriteLine("Apply completed successfully.");
}
textControl.InlineStyles.Add((InlineStyle)formattingStyle);Dim formattingStyle As FormattingStyle = New InlineStyle("Emphasis")
If formattingStyle.Apply() Then
Console.WriteLine("Apply completed successfully.")
End If
textControl.InlineStyles.Add(DirectCast(formattingStyle, InlineStyle))