WorkflowView.VScrollBar 属性

定义

获取与 WorkflowView 关联的垂直滚动条。

public:
 property System::Windows::Forms::VScrollBar ^ VScrollBar { System::Windows::Forms::VScrollBar ^ get(); };
public System.Windows.Forms.VScrollBar VScrollBar { get; }
member this.VScrollBar : System.Windows.Forms.VScrollBar
Public ReadOnly Property VScrollBar As VScrollBar

属性值

一个用于调整水平滚动条的设置和可见性的 ScrollBar

示例

下面的代码示例演示如何获取 WorkflowView 类的实例。 代码随后设置若干 WorkflowView 属性,包括 HScrollBarVScrollBar,然后调用 FitToWorkflowSize 方法。

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();
        }
    }
}
Public Sub DisplayFullWorkflowView()
    Dim designerHost As IDesignerHost = CType(GetService(GetType(IDesignerHost)), IDesignerHost)
    If designerHost IsNot Nothing And designerHost.RootComponent IsNot Nothing Then
        Dim workflowView As WorkflowView = _
                    CType(designerHost.RootComponent.Site.GetService(GetType(WorkflowView)), WorkflowView)
        If workflowView IsNot Nothing Then
            workflowView.Dock = DockStyle.Fill
            workflowView.TabIndex = 1
            workflowView.TabStop = True
            workflowView.HScrollBar.TabStop = False
            workflowView.VScrollBar.TabStop = False
            workflowView.Focus()
            workflowView.FitToWorkflowSize()
        End If
    End If
End Sub

注解

使用 VScrollBar 可以获取 WorkflowView 上的垂直滚动条,可以使用它进行用户界面调整。

适用于

另请参阅