Export (0) Print
Expand All

WorkflowView Class

Provides a design surface, which renders a visual representation of process flow.

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

public class WorkflowView : UserControl, IServiceProvider, IMessageFilter
public class WorkflowView extends UserControl implements IServiceProvider, IMessageFilter
public class WorkflowView extends UserControl implements IServiceProvider, IMessageFilter
Not applicable.

WorkflowView is the design surface which renders a visual representation of process flow described in workflow markup. WorkflowView offers a rich set of user interface functionality needed by the activity designers for rendering and for responding to various Windows-generated events. Also, the WorkflowView offers a set of common functions which can be used by all designers to perform certain activities.

The following code example demonstrates how you can obtain an instance of the WorkflowView class using the GetView method. The code then sets several WorkflowView properties, including HScrollBar and VScrollBar, and calls the FitToScreenSize method.

This code example is part of the Workflow Tracking Profile Designer SDK Sample from the WorkflowDesignerControl.cs file. For more information, see Workflow Tracking Profile Designer.

IDesignerHost designerHost = designSurface.GetService(typeof(IDesignerHost)) as IDesignerHost;
if (designerHost != null && designerHost.RootComponent != null)
{
    IRootDesigner rootDesigner = designerHost.GetDesigner(designerHost.RootComponent) as IRootDesigner;
    if (rootDesigner != null)
    {
        UnloadWorkflow();

        this.designSurface = designSurface;
        this.loader = loader;
        this.workflowView = rootDesigner.GetView(ViewTechnology.Default) as WorkflowView;
        this.panel1.Controls.Add(this.workflowView);
        this.workflowView.Dock = DockStyle.Fill;
        this.workflowView.TabIndex = 1;
        this.workflowView.TabStop = true;
        this.workflowView.HScrollBar.TabStop = false;
        this.workflowView.VScrollBar.TabStop = false;
        this.workflowView.Focus();
        this.workflowView.FitToScreenSize();
    }
}

System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
       System.Windows.Forms.Control
         System.Windows.Forms.ScrollableControl
           System.Windows.Forms.ContainerControl
             System.Windows.Forms.UserControl
              System.Workflow.ComponentModel.Design.WorkflowView

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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:
© 2014 Microsoft