共用方式為


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 上的垂直捲軸,您可以用它來調整使用者介面。

適用於

另請參閱