Partager via


WorkflowView.FitToWorkflowSize Méthode

Définition

Applique le niveau de zoom cent pour cent de manière à afficher le workflow en mode plein écran dans le WorkflowView.

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

Exemples

L'exemple suivant initialise les propriétés d'un objet WorkflowView en définissant plusieurs propriétés. La méthode FitToWorkflowSize conduit l'objet WorkflowView à afficher le workflow en mode plein écran dans la propriété ViewPortRectangle.

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

S’applique à