This documentation is archived and is not being maintained.

WorkflowChanges.SetCondition Method

Sets the condition property on a dependency object.

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

public static void SetCondition(
	Object dependencyObject,
	Object value


Type: System.Object
A DependencyObject (or derived type) that contains a condition property, such as the SequentialWorkflowActivity and StateMachineWorkflowActivity activities.
Type: System.Object
The condition type to set on the dependency object, such as an ActivityCondition.

The ConditionProperty is an attached dependency property, that is, it is declared and used by one type and set on another. Therefore, there must be static get and set methods on the type declaring the property.

Helper method for setting ConditionProperty.

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