Appearance Settings in Windows Forms MaskedTextBox (MaskedEditBox)
3 Sep 2020 / 1 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
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
Visual style
You can set the visual style to the MaskedEditBox control by using Style property.
this.maskedEditBox1.Style = TextBoxExt.theme.Office2016DarkGray;
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page