DependencyObject.GetValue Method
.NET Framework 3.5
Provides access to the value of the designated DependencyProperty.
Assembly: System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
Parameters
- dependencyProperty
- Type: System.Workflow.ComponentModel.DependencyProperty
The DependencyProperty.
Return Value
Type: System.ObjectThe object representing the value of the designated DependencyProperty.
The following code shows how to use GetValue to return the value represented by a named dependency property in the context of get and setThis code example is part of the Send E-mail SDK sample and is from the SendMailActivity.cs file. For more information, see Send E-mail Activity Sample.
public string To { get { return ((string)(base.GetValue(SendEmailActivity.ToProperty))); } set { base.SetValue(SendEmailActivity.ToProperty, value); } } [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)] [BrowsableAttribute(true)] [DescriptionAttribute("The Subject property is used to specify the subject of the Email message.")] [CategoryAttribute(MessagePropertiesCategory)] public string Subject { get { return ((string)(base.GetValue(SendEmailActivity.SubjectProperty))); } set { base.SetValue(SendEmailActivity.SubjectProperty, value); } } [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)] [BrowsableAttribute(true)] [DescriptionAttribute("The From property is used to specify the From (Sender's) address for the email mesage.")] [CategoryAttribute(MessagePropertiesCategory)] public string From { get { return ((string)(base.GetValue(SendEmailActivity.FromProperty))); } set { base.SetValue(SendEmailActivity.FromProperty, value); } }
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
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.