WorkflowView.Zoom Property


Gets or sets the zoom level of the WorkflowView.

Namespace:   System.Workflow.ComponentModel.Design
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

Public Property Zoom As Integer

Property Value

Type: System.Int32

The zoom level of the WorkflowView.

Exception Condition

If the zoom level is less than the minimum zoom level of the AmbientTheme


if the zoom level exceeds the maximum zoom level of the AmbientTheme.

Use the zoom feature to enlarge or reduce the size of the components inside the WorkflowView. The AmbientTheme sets the minimum and maximum zoom levels for the WorkflowView.

The following example shows how to set the Zoom property of a WorkflowView.

This code example is part of the Workflow Monitor SDK Sample from the MainForm.cs file. For more information, see Workflow Monitor Sample.

Private Sub ToolStripComboBoxZoom_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolStripComboBoxZoom.SelectedIndexChanged
    If workflowViewHost.WorkflowView Is Nothing Then
    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
            Me.workflowViewHost.WorkflowView.Zoom = Convert.ToInt32(NewZoom)
            Me.workflowViewHost.WorkflowView.Zoom = 100
        End Try
        Me.workflowViewHost.WorkflowView.Zoom = 100
    End If
End Sub

.NET Framework
Available since 3.0
Return to top