This documentation is archived and is not being maintained.

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)

[ActivityDesignerThemeAttribute(typeof(AmbientTheme), Xml = "<AmbientTheme xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow" ApplyTo="System.Workflow.ComponentModel.Design.WorkflowView" ShowConfigErrors="True" DrawShadow="False" DrawGrayscale="False" DropIndicatorColor="0xFF006400" SelectionForeColor="0xFF0000FF" SelectionPatternColor="0xFF736D63" ForeColor="0xFF808080" BackColor="0xFFFFFFFF" ShowGrid="False" GridColor="0xFFC0C0C0" TextQuality="Aliased" DrawRounded="True" ShowDesignerBorder="True" />")]
public class WorkflowView : UserControl, 
	IServiceProvider, IMessageFilter

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 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Show: