TX Text Control .NET for WPF

FrameFillColor Property

Property|Introduced in 24.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the color used to display the frame fill color at the current input position. If text is selected, the property specifies the fill color of the whole selected text. A background color can be set for table cells and paragraphs. If the fill color is transparent, a TextControl uses the control's background color.

Syntax

public Color? FrameFillColor { get; set; }

Examples

The following example changes the formatting applied to text entered at the end of a document by using InputFormat.FrameFillColor.

textControl.Text = "Project summary";
textControl.InputPosition = new InputPosition(textControl.Text.Length);
InputFormat inputFormat = textControl.InputFormat;

inputFormat.FrameFillColor = System.Drawing.Color.LightSteelBlue;
if (inputFormat.FrameFillColor != null)
{
    Console.WriteLine("Input Format: Frame Fill Color is available.");
}

Remarks

The property returns null when the text selection contains multiple table cells or paragraphs with mixed colors.