Assembly: System.Workflow.ComponentModel (in system.workflow.componentmodel.dll)
/** @attribute SerializableAttribute() */ public final class DependencyProperty implements ISerializable
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("firstname.lastname@example.org")); public static DependencyProperty ToProperty = DependencyProperty.Register("To", typeof(string), typeof(SendEmailActivity), new PropertyMetadata("email@example.com"));
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 EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.