DependencyProperty Class

A special kind of property that can be defined or attached to a DependencyObject. There are three kinds of dependency properties: instance properties, meta properties, and attached properties. This class cannot be inherited.

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

public sealed class DependencyProperty : ISerializable
/** @attribute SerializableAttribute() */ 
public final class DependencyProperty implements ISerializable
public final class DependencyProperty implements ISerializable
Not applicable.

Dependency properties support three use cases. First, if an instance property of an activity is implemented by using a dependency property, that property can be assigned an ActivityBind instead of an actual value. Second, activity properties that are metadata (that is, the value cannot change at run time) should be implemented by using dependency properties, specifying the Metadata option. Third, dependency properties support attached properties, which are properties that are applied to dependency objects dynamically.

The following example shows how a DependencyObject declares for use a DependencyProperty. by registering the property This code example is part of the Send E-mail SDK sample and is from the SendMailActivity.cs file. For more information, see Send Mail Activity.

// Define the DependencyProperty objects for all of the Properties 
// ...and Events exposed by this activity
public static DependencyProperty FromProperty = DependencyProperty.Register("From", typeof(string), typeof(SendEmailActivity), new PropertyMetadata(""));
public static DependencyProperty ToProperty = DependencyProperty.Register("To", typeof(string), typeof(SendEmailActivity), new PropertyMetadata(""));


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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

Community Additions