Appearance Settings in MaskedEditBox

4 Feb 20251 minute to read

Background settings

The background settings of the MaskedEditBox control are discussed below.

Background color

You can set the background color for the MaskedEditBox control by using the BackColor property.

MaskedEditBox Property Description
BackColor Specifies the background color of the component.
this.maskedEditBox1.BackColor = System.Drawing.Color.PaleGoldenrod;
Me.maskedEditBox1.BackColor = System.Drawing.Color.PaleGoldenrod

Set the background color to WF MaskedEditBox

You can also reset the background color for MaskedEditBox control by using the ResetBackColor method.

Method Description
ResetBackColor Resets the BackColor property to its default value.

## Foreground settings

The foreground settings of the MaskedEditBox control are discussed below.

Foreground color

You can set the foreground color for MaskedEditBox Control by using the ForeColor property.

MaskedEditBox Property Description
ForeColor Specifies the foreground color of this component, which is used to display text.
this.maskedEditBox1.ForeColor = System.Drawing.Color.DarkMagenta;
Me.maskedEditBox1.ForeColor = System.Drawing.Color.DarkMagenta

Set the fore color to the text of WF MaskedEditBox

Visual style

You can set the visual style to the MaskedEditBox control by using Style property.

this.maskedEditBox1.Style = TextBoxExt.theme.Office2016DarkGray;

Set the visual style to WF MaskedEditBox control