WorkflowView.RootDesigner Property

Gets or sets the root designer for the WorkflowView.

Namespace: System.Workflow.ComponentModel.Design
Assembly: System.Workflow.ComponentModel (in system.workflow.componentmodel.dll)

public ActivityDesigner RootDesigner { get; set; }
/** @property */
public ActivityDesigner get_RootDesigner ()

/** @property */
public void set_RootDesigner (ActivityDesigner value)

public function get RootDesigner () : ActivityDesigner

public function set RootDesigner (value : ActivityDesigner)

Not applicable.

Property Value

The ActivityDesigner associated with the WorkflowView.

The root designer of the workflow is the designer associated with the design surface of the workflow. It contains all child designers, and subsequently all activities in the workflow.

The following example shows how to retrieve the RootDesigner of a WorkflowView object. The workflowPanel field contains a method named GetWorkflowView that returns the active WorkflowView instance. The RootDesigner is then cast to a SequentialWorkflowRootDesigner before any action is taken on it.

This code example is part of the Basic DesignerHosting SDK Sample from the DesignerShell.cs file. For more information, see Basic Designer Hosting Sample.

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");
    }            
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show: