ActivityDesignerTheme.BackColorEnd 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 Color,做為在背景色彩中使用色彩漸層時的結束色彩。
public:
virtual property System::Drawing::Color BackColorEnd { System::Drawing::Color get(); void set(System::Drawing::Color value); };
[System.ComponentModel.TypeConverter(typeof(System.Workflow.ComponentModel.Design.ColorPickerConverter))]
public virtual System.Drawing.Color BackColorEnd { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Workflow.ComponentModel.Design.ColorPickerConverter))>]
member this.BackColorEnd : System.Drawing.Color with get, set
Public Overridable Property BackColorEnd As Color
屬性值
背景的結束 Color。
- 屬性
範例
下列範例示範如何建立自訂 ActivityDesignerTheme,其方式是從 ActivityDesignerTheme 類別衍生,並為新主題設定適當的屬性。
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
若要使用 ActivityDesigner 上的主題,請將 ActivityDesignerThemeAttribute 套用至 ActivityDesigner 類別。
[ActivityDesignerTheme(typeof(CustomActivityDesignerTheme))]
public class CustomActivityDesigner2 : ActivityDesigner
<ActivityDesignerTheme(GetType(CustomActivityDesignerTheme))> _
Public Class CustomActivityDesigner2
Inherits ActivityDesigner
備註
BackColorEnd,表示背景漸層的結束色彩。 若要使用背景漸層色彩,請設定 BackColorStart 和 BackColorEnd 屬性。 背景會從開始色彩逐漸變成結束色彩。