InitialStateName Property
Collapse the table of content
Expand the table of content

StateMachineWorkflowActivity::InitialStateName Property

Gets or sets the StateActivity in which the StateMachineWorkflowActivity is when an instance of the state machine is created.

Namespace:  System.Workflow.Activities
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)

[ValidationOptionAttribute(ValidationOption::Optional)]
public:
property String^ InitialStateName {
	String^ get ();
	void set (String^ value);
}

Property Value

Type: System::String
The StateActivity in which the StateMachineWorkflowActivity is when an instance of the state machine is created.

The InitialStateName property is mandatory and must be provided when a StateMachineWorkflowActivity is created. The InitialStateName of the state machine is like any other state activity that is contained within the state machine. The state activity can be a direct child of the StateMachineWorkflowActivity root activity and a StateMachineWorkflowActivity can have only one InitialStateName.

For more information aboutInitialStateName and CompletedStateName, see StateMachineWorkflowActivity.

The following code example shows how to set the value of the InitialStateName property. This code example is part of the SimpleStateMachineWorkflow SDK sample from the StateMachineWorkflow.cs file. For more information, seeSimple State Machine.

No code example is currently available or this language may not be supported.

.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.

Community Additions

ADD
Show:
© 2016 Microsoft