LoadViewState Method
Collapse the table of content
Expand the table of content

WorkflowView.LoadViewState Method (Stream)

 

Restores view-state information from a binary stream.

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

Public Sub LoadViewState (
	viewState As Stream
)

Parameters

viewState
Type: System.IO.Stream

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 Sub LoadViewState()
    Using fs As New FileStream("viewstate.bin", FileMode.Open)
        Me.workflowView.LoadViewState(fs)
    End Using
End Sub

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft