Прочетете на английски Редактиране

Споделяне чрез


WorkflowView.HScrollBar Property

Definition

Gets the horizontal scrollbar for the WorkflowView.

C#
public System.Windows.Forms.HScrollBar HScrollBar { get; }

Property Value

A ScrollBar you can use to adjust the settings and visibility of the horizontal scrollbar.

Examples

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.

C#
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();
        }
    }
}

Applies to

Продукт Версии
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also