DependencyProperty 클래스

정의

주의

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

정의하거나 DependencyObject에 연결할 수 있는 특별한 종류의 속성입니다. 세 종류의 종속성 속성(인스턴스 속성, 메타 속성 및 연결된 속성)이 있습니다. 이 클래스는 상속될 수 없습니다.

public ref class DependencyProperty sealed : System::Runtime::Serialization::ISerializable
[System.Serializable]
public sealed class DependencyProperty : System.Runtime.Serialization.ISerializable
[System.Serializable]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class DependencyProperty : System.Runtime.Serialization.ISerializable
[<System.Serializable>]
type DependencyProperty = class
    interface ISerializable
[<System.Serializable>]
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type DependencyProperty = class
    interface ISerializable
Public NotInheritable Class DependencyProperty
Implements ISerializable
상속
DependencyProperty
특성
구현

예제

다음 예제에서는 DependencyProperty에서 사용할 DependencyObject를 등록하는 방법을 보여 줍니다. 이 코드 예제에서는 보낼 전자 메일 SDK 샘플의 일부 이며 SendMailActivity.cs 파일에 있습니다. 자세한 내용은 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("someone@example.com"));
public static DependencyProperty ToProperty = DependencyProperty.Register("To", typeof(string), typeof(SendEmailActivity), new PropertyMetadata("someone@example.com"));
' Define the DependencyProperty objects for all of the Properties 
' ...and Events exposed by me activity
Public Shared FromEmailProperty As DependencyProperty = DependencyProperty.Register("From", GetType(String), GetType(SendEmailActivity), New PropertyMetadata("someone@example.com"))
Public Shared ToProperty As DependencyProperty = DependencyProperty.Register("To", GetType(String), GetType(SendEmailActivity), New PropertyMetadata("someone@example.com"))

설명

참고

이 자료에서는 더 이상 사용되지 않는 형식과 네임스페이스에 대해 설명합니다. 자세한 내용은 Deprecated Types in Windows Workflow Foundation 4.5(Windows Workflow Foundation 4.5에서 사용되지 않는 형식)를 참조하세요.

종속성 속성은 세 가지 사용 사례를 지원합니다. 첫째, 활동의 인스턴스 속성이 종속성 속성을 사용하여 구현된 경우 해당 속성에 실제 값 대신 ActivityBind를 할당할 수 있습니다. 둘째, 메타데이터(즉, 런타임에 값이 변경될 수 없음)인 활동 속성은 Metadata 옵션을 지정하여 종속성 속성으로 구현해야 합니다. 셋째, 종속성 속성은 종속성 개체에 동적으로 적용되는 속성인 연결된 속성을 지원합니다.

속성

DefaultMetadata

PropertyMetadata에 대한 사용자 정의 데이터를 나타내는 DependencyProperty를 가져옵니다.

IsAttached

DependencyProperty가 등록에 의해 DependencyObject에 연결되어 있는지 여부를 나타내는 속성을 가져옵니다.

IsEvent

DependencyProperty가 이벤트 Delegate인지 여부를 나타내는 속성을 가져옵니다.

Name

NameDependencyProperty을 가져옵니다.

OwnerType

TypeDependencyProperty을 가져옵니다.

PropertyType

Type에 저장된 값의 DependencyProperty을 가져옵니다.

ValidatorType

Type와 관련된 유효성 검사 논리를 구현하는 DependencyProperty을 가져옵니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
FromName(String, Type)

DependencyPropertyName을 기반으로 등록된 OwnerType를 가져옵니다.

FromType(Type)

특정 IList에 속하는 DependencyProperty 형식의 Type를 만듭니다.

GetHashCode()

이 인스턴스의 해시 코드를 반환합니다.

GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
Register(String, Type, Type)

입력 매개 변수에 따라 매개 변수화된 속성이 있는 DependencyProperty 클래스의 새 인스턴스를 초기화합니다.

Register(String, Type, Type, PropertyMetadata)

입력 매개 변수에 따라 매개 변수화된 속성이 있는 DependencyProperty 클래스의 새 인스턴스를 초기화합니다.

RegisterAttached(String, Type, Type)

입력 매개 변수에 따라 매개 변수화된 속성이 있는 DependencyProperty 클래스의 새 인스턴스를 초기화합니다. 이 인스턴스는 소유 형식의 개체가 아닌 개체에서 사용되는 속성을 선언합니다.

RegisterAttached(String, Type, Type, PropertyMetadata)

입력 매개 변수에 따라 매개 변수화된 속성이 있는 DependencyProperty 클래스의 새 인스턴스를 초기화합니다.

RegisterAttached(String, Type, Type, PropertyMetadata, Type)

입력 매개 변수에 따라 매개 변수화된 속성이 있는 DependencyProperty 클래스의 새 인스턴스를 초기화합니다.

ToString()

Object 메서드를 재정의하여 Name 속성 값을 반환합니다.

명시적 인터페이스 구현

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

대상 개체를 serialize하는 데 필요한 데이터로 SerializationInfo를 채웁니다.

적용 대상