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.
Assembly: System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
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 to register a for use by a DependencyObject. 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("email@example.com")); public static DependencyProperty ToProperty = DependencyProperty.Register("To", typeof(string), typeof(SendEmailActivity), new PropertyMetadata("firstname.lastname@example.org"));
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.