ForeColor Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the style's color used to display the text.
Syntax
public Color ForeColor { get; set; }Public Property ForeColor As ColorExamples
The following example creates a reusable emphasis style and adds it to the document by using FormattingStyle.ForeColor.
FormattingStyle formattingStyle = new InlineStyle("Emphasis");
formattingStyle.ForeColor = System.Drawing.Color.LightSteelBlue;
Console.WriteLine($"Fore Color used by Formatting Style: {formattingStyle.ForeColor}");
textControl.InlineStyles.Add((InlineStyle)formattingStyle);Dim formattingStyle As FormattingStyle = New InlineStyle("Emphasis")
formattingStyle.ForeColor = System.Drawing.Color.LightSteelBlue
Console.WriteLine($"Fore Color used by Formatting Style: {formattingStyle.ForeColor}")
textControl.InlineStyles.Add(DirectCast(formattingStyle, InlineStyle))