Export (0) Print
Expand All

WorkflowView.SaveWorkflowImage Method (Stream, ImageFormat)

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

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

public void SaveWorkflowImage (
	Stream stream,
	ImageFormat imageFormat
)
public void SaveWorkflowImage (
	Stream stream, 
	ImageFormat imageFormat
)
public function SaveWorkflowImage (
	stream : Stream, 
	imageFormat : ImageFormat
)
Not applicable.

Parameters

stream

The Stream to save the workflow view image to.

imageFormat

The ImageFormat to use to save the workflow view image.

Exception typeCondition

ArgumentNullException

stream 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 Stream. In this example, a SaveFileDialog is created to prompt the user for the filename of the image to save. A FileStream object is then created using the filename and then passed to the SaveWorkflowImage method.

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft