TX Text Control .NET for Windows Forms

BackColor Property

Property
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Overridden. Gets or sets the background color of the control. The property value can be set to Color.Transparent to have a transparent background. A transparent background is only possible if the ViewMode property has been set to SimpleControl. A TextControl uses the ControlStyles.SupportsTransparentBackColor style to enable transparency. This style shows the contents of the control's parent in the control's background. If there is another control between the control and its parent, the TextControl will not show the control in the middle. See the description of the ControlStyles enumeration in the .net Framework documentation.

Syntax

public override Color BackColor { get; set; }

Examples

The following example uses TextControl.BackColor to set the text control's background color. The change is then applied to the active document or user interface.

textControl.BackColor = System.Drawing.Color.LightSteelBlue;
textControl.Update();