다음을 통해 공유


ParallelActivityDesigner.Verbs 속성

정의

ParallelActivityDesigner와 연결할 디자이너 동사 컬렉션을 가져옵니다.

protected:
 virtual property System::Workflow::ComponentModel::Design::ActivityDesignerVerbCollection ^ Verbs { System::Workflow::ComponentModel::Design::ActivityDesignerVerbCollection ^ get(); };
protected override System.Workflow.ComponentModel.Design.ActivityDesignerVerbCollection Verbs { get; }
member this.Verbs : System.Workflow.ComponentModel.Design.ActivityDesignerVerbCollection
Protected Overrides ReadOnly Property Verbs As ActivityDesignerVerbCollection

속성 값

ActivityDesignerVerbCollection

ActivityDesignerVerbCollection와 연결할 디자이너 동사가 포함된 ParallelActivityDesigner입니다.

예제

다음 예제에서는 Verbs의 사용자 지정 동사 작업을 삽입하기 위해 ActivityPreviewDesigner 속성을 재정의하는 방법을 보여 줍니다. CreateActivityVerbsActivityDesignerVerb라는 새 "Add New Parallel Branch"를 만들고 OnAddParallelBranch라는 이벤트 처리기를 연결합니다. 워크플로 디자이너에서 동사를 클릭하면 이벤트 처리기가 호출됩니다.

private ActivityDesignerVerbCollection verbs = null;

protected override ActivityDesignerVerbCollection Verbs
{
    get
    {
        if (this.verbs == null)
            CreateActivityVerbs();

        return this.verbs;
    }
}

private void CreateActivityVerbs()
{
    this.verbs = new ActivityDesignerVerbCollection();

    ActivityDesignerVerb addBranchVerb = new ActivityDesignerVerb(this,
        DesignerVerbGroup.View, "Add New Parallel Branch", new EventHandler(OnAddParallelBranch));
    this.verbs.Clear();

    this.verbs.Add(addBranchVerb);
}

protected void OnAddParallelBranch(object sender, EventArgs e)
{
    // Code for adding a new branch to the parallel activity goes here
}
Private verbsValue As ActivityDesignerVerbCollection = Nothing

Protected Overrides ReadOnly Property Verbs() As ActivityDesignerVerbCollection
    Get
        If verbsValue Is Nothing Then
            CreateActivityVerbs()
        End If
        Return Me.verbsValue

    End Get
End Property

Private Sub CreateActivityVerbs()
    Me.verbsValue = New ActivityDesignerVerbCollection()

    Dim addBranchVerb As New ActivityDesignerVerb(Me, DesignerVerbGroup.View, "Add New Parallel Branch", AddressOf OnAddParallelBranch)

    Me.verbsValue.Clear()

    Me.verbsValue.Add(addBranchVerb)
End Sub

Protected Sub OnAddParallelBranch(ByVal sender As Object, ByVal e As EventArgs)
    ' Code for adding a new branch to the parallel activity goes here
End Sub

설명

Verbs 속성은 ParallelActivityDesigner 상황에 맞는 메뉴에 표시되는 명령을 결정합니다.

동사 컬렉션에는 확장된 디자이너 클래스에서 상속되는 디자이너 동사 ParallelActivityDesigner가 포함됩니다.

적용 대상