WorkflowView.RootDesigner 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
WorkflowView의 루트 디자이너를 가져오거나 설정합니다.
public:
property System::Workflow::ComponentModel::Design::ActivityDesigner ^ RootDesigner { System::Workflow::ComponentModel::Design::ActivityDesigner ^ get(); void set(System::Workflow::ComponentModel::Design::ActivityDesigner ^ value); };
public System.Workflow.ComponentModel.Design.ActivityDesigner RootDesigner { get; set; }
member this.RootDesigner : System.Workflow.ComponentModel.Design.ActivityDesigner with get, set
Public Property RootDesigner As ActivityDesigner
속성 값
ActivityDesigner와 연결된 WorkflowView입니다.
예제
다음 예제에서는 WorkflowView 개체의 RootDesigner를 검색하는 방법을 보여 줍니다. workflowPanel 필드에 포함된 GetWorkflowView 메서드는 활성 WorkflowView 인스턴스를 반환합니다. 그 다음 RootDesigner가 다른 모든 작업에 앞서 SequentialWorkflowRootDesigner로 캐스팅됩니다.
이 코드 예제는 DesignerShell.cs 파일에 있는 Basic DesignerHosting SDK 샘플의 일부입니다. 자세한 내용은 Basic Designer Hosting 샘플합니다.
private void addButton_Click(object sender, EventArgs e)
{
SequentialWorkflowRootDesigner rootDesigner = this.workflowPanel.GetWorkflowView().RootDesigner as SequentialWorkflowRootDesigner;
int viewId = rootDesigner.ActiveView.ViewId;
if (viewId == 1)
{
this.workflowPanel.OnCodeActivityAdded();
}
else
{
DialogResult resultBox = MessageBox.Show("This sample supports adding a code activity only in workflow view");
}
}
Private Sub addButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addButton.Click
Dim viewId As Integer
Dim rootDesigner As SequentialWorkflowRootDesigner
rootDesigner = Me.workflowPanel.GetWorkflowView().RootDesigner
viewId = rootDesigner.ActiveView.ViewId
If viewId = 1 Then
Me.workflowPanel.OnCodeActivityAdded()
Else
Dim resultBox As DialogResult
resultBox = MessageBox.Show("This sample supports adding a code activity only in workflow view")
End If
End Sub
설명
워크플로의 루트 디자이너는 워크플로의 디자인 화면에 연결된 디자이너입니다. 모든 자식 디자이너와 그에 따른 워크플로의 모든 활동이 포함되어 있습니다.