ActivityDesignerTheme.ForeColor Property

 

Gets or sets the color of the foreground.

Namespace:   System.Workflow.ComponentModel.Design
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

public virtual Color ForeColor { get; set; }

Property Value

Type: System.Drawing.Color

A Color that represents the foreground color of the theme.

Use the ForeColor property to specify the foreground color of the theme. The foreground color is usually the color of the text.

The following example shows how to create a custom ActivityDesignerTheme by deriving from the ActivityDesignerTheme class and setting the appropriate properties for the new theme.

public class CustomActivityDesignerTheme : ActivityDesignerTheme
{
    public CustomActivityDesignerTheme(WorkflowTheme theme)
        : base(theme)
    {
        base.Initialize();
        this.BorderStyle = DashStyle.Solid;
        this.BorderColor = Color.FromArgb(0, 0, 0);
        this.BackColorStart = Color.FromArgb(37, 15, 242);
        this.BackColorEnd = Color.FromArgb(189, 184, 254);
        this.BackgroundStyle = LinearGradientMode.Vertical;
        this.ForeColor = Color.Black;
    }
}

To use the theme on an ActivityDesigner, apply the ActivityDesignerThemeAttribute to the ActivityDesigner class.

[ActivityDesignerTheme(typeof(CustomActivityDesignerTheme))]
public class CustomActivityDesigner2 : ActivityDesigner

.NET Framework
Available since 3.0
Return to top
Show: