다음을 통해 공유


DependencyObject.GetValue(DependencyProperty) 메서드

정의

지정된 DependencyProperty의 값에 대한 액세스를 제공합니다.

public:
 System::Object ^ GetValue(System::Workflow::ComponentModel::DependencyProperty ^ dependencyProperty);
public object GetValue (System.Workflow.ComponentModel.DependencyProperty dependencyProperty);
member this.GetValue : System.Workflow.ComponentModel.DependencyProperty -> obj
Public Function GetValue (dependencyProperty As DependencyProperty) As Object

매개 변수

반환

Object

지정된 DependencyProperty의 값을 나타내는 개체입니다.

예제

다음 코드에서는 GetValue를 사용하여 get 및 set 컨텍스트에서 명명된 종속성 속성이 나타내는 값을 반환합니다. 이 코드 예제에서는 보낼 전자 메일 SDK 샘플의 일부 이며 SendMailActivity.cs 파일에 있습니다. 자세한 내용은 전자 메일 보내기 활동 샘플합니다.

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);
    }
}
<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

설명

이 멤버는 일반적으로 명명된 종속성 값을 제공하기 위해 속성 get에 사용됩니다.

적용 대상