public static DependencyProperty RegisterAttached(string name, Type propertyType, Type ownerType,
PropertyMetadata defaultMetadata,
ValidateValueCallback validateValueCallback)
{
DependencyProperty dp = new DependencyProperty(true, name, propertyType, ownerType,
defaultMetadata, validateValueCallback);
DependencyObject.register(ownerType, dp);
return(dp);
}