Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DependencyObject.GetValue Method

Provides access to the value of the designated DependencyProperty.

Namespace:  System.Workflow.ComponentModel
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
'Declaration
Public Function GetValue ( _
	dependencyProperty As DependencyProperty _
) As Object
'Usage
Dim instance As DependencyObject 
Dim dependencyProperty As DependencyProperty 
Dim returnValue As Object 

returnValue = instance.GetValue(dependencyProperty)

Return Value

Type: System.Object
The object representing the value of the designated DependencyProperty.

This member is typically used in property gets to furnish the value of the named dependency value.

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.

<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)> _
<BrowsableAttribute(True)> _
<DescriptionAttribute("The To property is used to specify the receipient's email address.")> _
<CategoryAttribute(MessagePropertiesCategory)> _
Public Property EmailTo() As String 
    Get 
        Return CType(MyBase.GetValue(SendEmailActivity.ToProperty), String)
    End Get 
    Set(ByVal value As String)
        MyBase.SetValue(SendEmailActivity.ToProperty, value)
    End Set 
End Property

<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)> _
<BrowsableAttribute(True)> _
<DescriptionAttribute("The Subject property is used to specify the subject of the Email message.")> _
<CategoryAttribute(MessagePropertiesCategory)> _
Public Property Subject() As String 
    Get 
        Return CType(MyBase.GetValue(SendEmailActivity.SubjectProperty), String)
    End Get 
    Set(ByVal value As String)
        MyBase.SetValue(SendEmailActivity.SubjectProperty, value)
    End Set 
End Property


<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 Property FromEmail() As String 
    Get 
        Return CType(MyBase.GetValue(SendEmailActivity.FromEmailProperty), String)
    End Get 
    Set(ByVal value As String)
        MyBase.SetValue(SendEmailActivity.FromEmailProperty, value)
    End Set 
End Property

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.

.NET Framework

Supported in: 3.5, 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.