ActivityDesignerTheme.BackColorStart Property

 

Gets or sets the starting color of the background when using a color gradient on the background.

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

public virtual Color BackColorStart { get; set; }

Property Value

Type: System.Drawing.Color

The background starting Color.

BackColorStart indicates the background color, or the beginning color of a background gradient. To use background gradient color, set the BackColorStart and BackColorEnd properties. The background will gradually change color from the start color to the end color.

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: