共用方式為


ActivityDesignerTheme.BorderColor 屬性

定義

取得或設定主題的 BorderColor

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

屬性值

Color

Color,表示主題的 BorderColor

屬性

範例

下列範例示範如何建立自訂 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

備註

BorderColor 為用來繪製形狀框線的色彩。

適用於