DependencyProperty.OwnerType Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the type of the object that registered the dependency property with the property system, or added itself as owner of the property.
public:
property Type ^ OwnerType { Type ^ get(); };
public Type OwnerType { get; }
member this.OwnerType : Type
Public ReadOnly Property OwnerType As Type
Property Value
The type of the object that registered the property or added itself as owner of the property.
Examples
The following example gets the owner type based on a dependency property identifier dp
, and then gets metadata on the owner type for that same identifier. This operation is actually equivalent to getting DefaultMetadata on dp
.
pm = dp.GetMetadata(dp.OwnerType);
pm = dp.GetMetadata(dp.OwnerType)
Remarks
This value was provided during property registration. The owner will be either the original registering type in the case of a DependencyProperty identifier generated from a Register call, or the type that added itself as owner in the case of a DependencyProperty identifier generated from an AddOwner call.
The OwnerType on any given DependencyProperty is immutable, and cannot be null
in a valid DependencyProperty.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback을 참조하세요.
출시 예정: 2024년 내내 콘텐츠 피드백 메커니즘인 GitHub 문제를 단계적으로 폐지하고 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은다음에 대한 사용자 의견 제출 및 보기