This documentation is archived and is not being maintained.

WorkflowView.LoadViewState Method

Restores view-state information from a binary stream.

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

public void LoadViewState (
	Stream viewState
)
public void LoadViewState (
	Stream viewState
)
public function LoadViewState (
	viewState : Stream
)
Not applicable.

Parameters

viewState

A BinaryReader used to restore the view state.

LoadViewState restores view-state information previously saved by calling the SaveViewState method.

Override this method when you need to customize how a custom designer restores its view-state.

The following example demonstrates how to load the view state for a WorkflowView object by creating a FileStream object with the FileMode.Open flag and passing it to the LoadViewState method. The view state file was created using the SaveViewState method.

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

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
Show: