CompositeDesignerTheme(WorkflowTheme) 构造函数

定义

初始化 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

适用于