StyleSheet.ForeColor Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the specified foreground color for the style. Typically, this property sets the color for the text. The default value is Empty. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the Web site.

Namespace:   System.Web.UI.MobileControls
Assembly:  System.Web.Mobile (in System.Web.Mobile.dll)

public override Color ForeColor { get; set; }

Property Value

Type: System.Drawing.Color

The foreground Color of the control.

Exception Condition

The ForeColor property was accessed at run time.


An attempt was made to set the property.

You can use the ForeColor property to display text in a different color. For more information, see MobileControl.ForeColor.

.NET Framework
Available since 1.1
Return to top