This topic has not yet been rated - Rate this topic

WorkflowView.SaveWorkflowImage Method (String, ImageFormat)

Saves an image of the WorkflowView to the specified file using the specified image format.

Namespace:  System.Workflow.ComponentModel.Design
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
public void SaveWorkflowImage(
	string imageFile,
	ImageFormat imageFormat
)

Parameters

imageFile
Type: System.String
The path to the file in which to store the workflow view image.
imageFormat
Type: System.Drawing.Imaging.ImageFormat
The ImageFormat to use to save the workflow view image.
ExceptionCondition
ArgumentNullException

imageFile or imageFormat contains a null reference (Nothing in Visual Basic).

The workflow view image is created as a bitmap.

The following example shows how to save the currently loaded workflow image using a String. In this example, a SaveFileDialog is created to prompt the user for the filename of the image to save. The filename and the ImageFormat.Bmp flag are then passed to the SaveWorkflowImage method.


public void SaveWorkflowImage()
{
    SaveFileDialog saveFileDialog = new SaveFileDialog();
    saveFileDialog.Filter = "Bitmap Files|*.bmp";
    if (saveFileDialog.ShowDialog() == DialogResult.OK)
    {
        this.workflowView.SaveWorkflowImage(saveFileDialog.FileName, ImageFormat.Bmp);
    }
}


.NET Framework

Supported in: 4, 3.5, 3.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.