ForeColor Property (MobileControl)

Sets or returns the specified foreground color for the style. Typically, this property sets the color for the text. The default value is Color.Empty.

public virtual System.Drawing.Color ForeColor {
   get,
   set
}

Remarks

You can use the ForeColor property to display text in different colors for all the controls and classes listed in the Inheritance section that follows. For example, in the AdRotator control, setting the ForeColor property changes the color of the text in the control; in the Calendar control, it changes the color of the text in the calendar; and in the ValidationSummary control, it changes the color of the text of the error messages.

The strings that can be used for colors are a set of fixed colors and hexadecimal RGB values. These values can also be specified as "#bb7023".

You can also use the Microsoft Windows color constants. For specific details, see Color Changes in VisualBasic. NET .

Inheritance

The following is a list of the classes that inherit the ForeColor property from the MobileControl base class.

AdRotator Class PagedControl Class
Calendar Class Panel Class
Command Class PhoneCall Class
CompareValidator Class RangeValidator Class
CustomValidator Class RegularExpressionValidator Class
Form Class RequiredFieldValidator Class
Image Class SelectionList Class
Label Class TextBox Class
Link Class TextControl Class
List Class TextView Class
ObjectList Class ValidationSummary Class

See Also

Applies to: MobileControl Class