Udostępnij za pośrednictwem


CompositeDesignerTheme(WorkflowTheme) Konstruktor

Definicja

Inicjuje nowe wystąpienie klasy 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)

Parametry

theme
WorkflowTheme

Element WorkflowTheme do skojarzenia z motywem projektanta złożonego.

Przykłady

W poniższym przykładzie pokazano, jak utworzyć niestandardowy CompositeDesignerTheme element pochodny z CompositeDesignerTheme klasy i ustawić odpowiednie właściwości dla nowego motywu.

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

Aby użyć motywu w obiekcie CompositeActivityDesigner, zastosuj element ActivityDesignerThemeAttribute do CompositeActivityDesigner klasy .

[ActivityDesignerTheme(typeof(ParallelIfTheme))]
public class ParallelIfDesigner : ParallelActivityDesigner
<ActivityDesignerTheme(GetType(ParallelIfTheme))> _
Public Class ParallelIfDesigner
    Inherits ParallelActivityDesigner

Dotyczy