Partilhar via


ActivityDesignerTheme.BackColorStart Propriedade

Definição

Obtém ou define a cor inicial da tela de fundo ao usar um gradiente de cores na tela de fundo.

public:
 virtual property System::Drawing::Color BackColorStart { System::Drawing::Color get(); void set(System::Drawing::Color value); };
[System.ComponentModel.TypeConverter(typeof(System.Workflow.ComponentModel.Design.ColorPickerConverter))]
public virtual System.Drawing.Color BackColorStart { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Workflow.ComponentModel.Design.ColorPickerConverter))>]
member this.BackColorStart : System.Drawing.Color with get, set
Public Overridable Property BackColorStart As Color

Valor da propriedade

Color

A tela de fundo começando Color.

Atributos

Exemplos

O exemplo a seguir mostra como criar um personalizado ActivityDesignerTheme derivando da ActivityDesignerTheme classe e definindo as propriedades apropriadas para o novo tema.

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;
    }
}
Public Class CustomActivityDesignerTheme
    Inherits ActivityDesignerTheme
    Public Sub New(ByVal theme As WorkflowTheme)
        MyBase.new(theme)

        MyBase.Initialize()
        Me.BorderStyle = DashStyle.Solid
        Me.BorderColor = Color.FromArgb(0, 0, 0)
        Me.BackColorStart = Color.FromArgb(37, 15, 242)
        Me.BackColorEnd = Color.FromArgb(189, 184, 254)
        Me.BackgroundStyle = LinearGradientMode.Vertical
        Me.ForeColor = Color.Black
    End Sub
End Class

Para usar o tema em um ActivityDesigner, aplique a ActivityDesignerThemeAttribute ActivityDesigner classe.

[ActivityDesignerTheme(typeof(CustomActivityDesignerTheme))]
public class CustomActivityDesigner2 : ActivityDesigner
<ActivityDesignerTheme(GetType(CustomActivityDesignerTheme))> _
Public Class CustomActivityDesigner2
    Inherits ActivityDesigner

Comentários

BackColorStart indica a cor da tela de fundo ou a cor inicial de um gradiente de plano de fundo. Para usar a cor do gradiente de plano de fundo, defina as propriedades e BackColorEnd as BackColorStart propriedades. A tela de fundo mudará gradualmente a cor da cor inicial para a cor final.

Aplica-se a