Gets or sets the background color of a paragraph. If the background color is transparent, the paragraph's background is the same as the control's background color.

Introduced: X14.

Syntax

public System.Drawing.Color BackColor { get; set; }
Public Property BackColor() As System.Drawing.Color

Examples

The following example uses the BackColor property to set the background color of the paragraph to White.

TXTextControl.ParagraphFormat format = new TXTextControl.ParagraphFormat();

format.Alignment  = TXTextControl.HorizontalAlignment.Center;
format.Frame      = TXTextControl.Frame.Box;
format.FrameStyle = TXTextControl.FrameStyle.Double;
format.BackColor  = System.Drawing.Color.White;

textControl1.Selection.ParagraphFormat = format;
Dim format As TXTextControl.ParagraphFormat = New TXTextControl.ParagraphFormat()

format.Alignment  = TXTextControl.HorizontalAlignment.Center
format.Frame      = TXTextControl.Frame.Box
format.FrameStyle = TXTextControl.FrameStyle.Double
format.BackColor  = System.Drawing.Color.White

TextControl1.Selection.ParagraphFormat = format

Remarks

The property's default value is Color.Transparent.

The property returns its default value when the text selection contains multiple paragraphs with mixed background colors. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.