CompositeDesignerTheme(WorkflowTheme) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 CompositeDesignerTheme 類別的新執行個體。
public:
CompositeDesignerTheme(System::Workflow::ComponentModel::Design::WorkflowTheme ^ theme);
public CompositeDesignerTheme (System.Workflow.ComponentModel.Design.WorkflowTheme theme);
new System.Workflow.ComponentModel.Design.CompositeDesignerTheme : System.Workflow.ComponentModel.Design.WorkflowTheme -> System.Workflow.ComponentModel.Design.CompositeDesignerTheme
Public Sub New (theme As WorkflowTheme)
參數
- theme
- WorkflowTheme
關聯於複合設計工具主題的 WorkflowTheme。
範例
下列範例示範如何建立自訂 CompositeDesignerTheme,其方式是從 CompositeDesignerTheme 類別衍生,並為新主題設定適當的屬性。
public class ParallelIfTheme : CompositeDesignerTheme
{
public ParallelIfTheme(WorkflowTheme theme)
: base(theme)
{
this.ShowDropShadow = true;
this.ConnectorStartCap = LineAnchor.None;
this.ConnectorEndCap = LineAnchor.None;
this.BorderStyle = DashStyle.Dash;
this.WatermarkImagePath = @"parallelIfWatermark.png";
this.WatermarkAlignment = DesignerContentAlignment.Fill;
}
}
Public Class ParallelIfTheme
Inherits CompositeDesignerTheme
Public Sub New(ByVal theme As WorkflowTheme)
MyBase.new(theme)
Me.ShowDropShadow = True
Me.ConnectorStartCap = LineAnchor.None
Me.ConnectorEndCap = LineAnchor.None
Me.BorderStyle = DashStyle.Dash
Me.WatermarkImagePath = "parallelIfWatermark.png"
Me.WatermarkAlignment = DesignerContentAlignment.Fill
End Sub
End Class
若要使用 CompositeActivityDesigner 上的主題,請將 ActivityDesignerThemeAttribute 套用至 CompositeActivityDesigner 類別。
[ActivityDesignerTheme(typeof(ParallelIfTheme))]
public class ParallelIfDesigner : ParallelActivityDesigner
<ActivityDesignerTheme(GetType(ParallelIfTheme))> _
Public Class ParallelIfDesigner
Inherits ParallelActivityDesigner