WorkflowView.FitToWorkflowSize Methode

Definition

Ändert den Zoomfaktor in 100%, um den Workflow vollständig in WorkflowView anzuzeigen.

public:
 void FitToWorkflowSize();
public void FitToWorkflowSize ();
member this.FitToWorkflowSize : unit -> unit
Public Sub FitToWorkflowSize ()

Beispiele

Im folgenden Beispiel werden die Eigenschaften eines WorkflowView-Objekts initialisiert, indem mehrere Eigenschaften festgelegt werden. FitToWorkflowSize bewirkt, dass das WorkflowView-Objekt die vollständige Größe des Workflows im ViewPortRectangle anzeigt.

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

Gilt für