WorkflowView.Zoom Propiedad

Definición

Obtiene o establece el nivel de zoom de WorkflowView.Gets or sets the zoom level of the 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

Valor de propiedad

Int32

El nivel de la zoom de WorkflowView.The zoom level of the WorkflowView.

Excepciones

Si el nivel de zoom es menor que el nivel de zoom mínimo de AmbientThemeIf the zoom level is less than the minimum zoom level of the AmbientTheme

o bien-or- si el nivel de zoom supera el nivel de zoom máximo de AmbientTheme.if the zoom level exceeds the maximum zoom level of the AmbientTheme.

Ejemplos

En el ejemplo siguiente se muestra cómo se establece la propiedad Zoom de WorkflowView.The following example shows how to set the Zoom property of a WorkflowView.

Este ejemplo de código pertenece al ejemplo SDK del monitor de flujo de trabajo del archivo MainForm.cs.This code example is part of the Workflow Monitor SDK Sample from the MainForm.cs file. Para obtener más información, vea ejemplo de monitor de flujo de trabajo.For more information, see Workflow Monitor Sample.

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

Comentarios

Utilice la característica de zoom para ampliar o reducir el tamaño de los componentes dentro de WorkflowView.Use the zoom feature to enlarge or reduce the size of the components inside the WorkflowView. AmbientTheme establece los niveles de zoom mínimos y máximos para WorkflowView.The AmbientTheme sets the minimum and maximum zoom levels for the WorkflowView.

Se aplica a