/// <summary>
/// Creates a new dependency property descriptor. A note on perf: We don't
/// pass the property descriptor down as the default member descriptor here. Doing
/// so takes the attributes off of the property descriptor, which can be costly if they
/// haven't been accessed yet. Instead, we wait until someone needs to access our
/// Attributes property and demand create the attributes at that time.
/// </summary>
internal DependencyObjectPropertyDescriptor(DependencyProperty dp, Type ownerType)
: base(string.Concat(dp.OwnerType.Name, ".", dp.Name), null)
{
_dp = dp;
_componentType = ownerType;
_metadata = _dp.GetMetadata(ownerType);
}