Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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 int Zoom { get; set; }

Property Value

Type: System.Int32
The zoom level of the WorkflowView.
ExceptionCondition
NotSupportedException

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

-or-

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 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;
}

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.