WorkflowView.Zoom Propriété

Définition

Obtient ou définit le niveau de zoom du WorkflowView.

public:
 property int Zoom { int get(); void set(int value); };
public int Zoom { get; set; }
member this.Zoom : int with get, set
Public Property Zoom As Integer

Valeur de propriété

Niveau de zoom du WorkflowView.

Exceptions

Si le niveau de zoom est inférieur au niveau de zoom minimal du AmbientTheme

- ou -

Si le niveau de zoom dépasse le niveau de zoom maximal du AmbientTheme.

Exemples

L'exemple suivant montre comment définir la propriété Zoom d'un WorkflowView.

Cet exemple de code fait partie de l'exemple du Kit de développement logiciel Workflow Monitor (SDK) et provient du fichier Mainform.cs. Pour plus d’informations, consultez Exemple de moniteur de flux de travail.

private void ToolStripComboBoxZoom_SelectedIndexChanged(object sender, EventArgs e)
{
    if (workflowViewHost.WorkflowView == null) return;
    //Parse the value and set the WorkflowView zoom - set to 100% if invalid
    string newZoom = this.toolStripComboBoxZoom.Text.Trim();
    if (newZoom.EndsWith("%"))
        newZoom = newZoom.Substring(0, newZoom.Length - 1);

    if (newZoom.Length > 0)
    {
        try
        {
            this.workflowViewHost.WorkflowView.Zoom = Convert.ToInt32(newZoom);
        }
        catch
        {
            this.workflowViewHost.WorkflowView.Zoom = 100;
        }
    }
    else
    {
        this.workflowViewHost.WorkflowView.Zoom = 100;
    }
}
Private Sub ToolStripComboBoxZoom_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolStripComboBoxZoom.SelectedIndexChanged
    If workflowViewHost.WorkflowView Is Nothing Then
        Return
    End If

    'Parse the value and set the WorkflowView zoom - set to 100% if invalid
    Dim NewZoom As String = Me.toolStripComboBoxZoom.Text.Trim()
    If NewZoom.EndsWith("%") Then
        NewZoom = NewZoom.Substring(0, NewZoom.Length - 1)
    End If

    If NewZoom.Length > 0 Then
        Try
            Me.workflowViewHost.WorkflowView.Zoom = Convert.ToInt32(NewZoom)
        Catch
            Me.workflowViewHost.WorkflowView.Zoom = 100
        End Try
    Else
        Me.workflowViewHost.WorkflowView.Zoom = 100
    End If
End Sub

Remarques

Utilisez la fonctionnalité de zoom pour agrandir ou réduire la taille des composants à l’intérieur du WorkflowView. AmbientTheme définit le niveau de zoom minimal et maximal du WorkflowView.

S’applique à