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

WorkflowView.SaveViewState Method

Saves the view-state to a binary stream.

Namespace:  System.Workflow.ComponentModel.Design
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
public void SaveViewState(
	Stream viewState
)

Parameters

viewState
Type: System.IO.Stream
A BinaryReader used to store the view state.

View state is the accumulation of the values of the properties and child controls of a view. Property values are persisted to the stream after saving and can be restored using the LoadViewState method.

The following example demonstrates saving the view state for a WorkflowView object by creating a FileStream object using the FileMode.Create flag and passing it to the SaveViewState method. To load this view state at a later time, see LoadViewState.


public void SaveViewState()
{
    using (FileStream fs = new FileStream(@"viewstate.bin", FileMode.Create))
    {
        this.workflowView.SaveViewState(fs);
    }
}


.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)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.