Export (0) Print
Expand All

WorkflowView.HScrollBar Property

Gets the horizontal scrollbar for the WorkflowView.

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

public HScrollBar HScrollBar { get; }

Property Value

Type: System.Windows.Forms.HScrollBar
A ScrollBar you can use to adjust the settings and visibility of the horizontal scrollbar.

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

public void DisplayFullWorkflowView()
{
    IDesignerHost designerHost = designSurface.GetService(typeof(IDesignerHost)) as IDesignerHost;
    if (designerHost != null && designerHost.RootComponent != null)
    {
        WorkflowView workflowView = designerHost.RootComponent.Site.GetService(typeof(WorkflowView)) as WorkflowView;
        if (workflowView != null)
        {
            workflowView.Dock = DockStyle.Fill;
            workflowView.TabIndex = 1;
            workflowView.TabStop = true;
            workflowView.HScrollBar.TabStop = false;
            workflowView.VScrollBar.TabStop = false;
            workflowView.Focus();
            workflowView.FitToWorkflowSize();
        }
    }
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0
Show:
© 2015 Microsoft