ActivityDesignerTheme.BorderStyle 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定用於框線的樣式。
public:
virtual property System::Drawing::Drawing2D::DashStyle BorderStyle { System::Drawing::Drawing2D::DashStyle get(); void set(System::Drawing::Drawing2D::DashStyle value); };
[System.ComponentModel.TypeConverter(typeof(System.Workflow.ComponentModel.Design.FilteredEnumConverter))]
public virtual System.Drawing.Drawing2D.DashStyle BorderStyle { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Workflow.ComponentModel.Design.FilteredEnumConverter))>]
member this.BorderStyle : System.Drawing.Drawing2D.DashStyle with get, set
Public Overridable Property BorderStyle As DashStyle
屬性值
DashStyle 列舉型別 (Enumeration),表示用於框線的樣式。
- 屬性
範例
下列範例示範如何建立自訂 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
備註
BorderStyle 為用於繪製形狀框線的線條樣式。