DependencyProperty(
     string propertyName,
     Type propertyType,
     Type ownerType,
     PropertyMetadata metadata)
 {
     Name = propertyName;
     PropertyType = propertyType;
     OwnerType = ownerType;
     DefaultMetadata = metadata;
 }
 public static DependencyProperty RegisterAttached(string name, Type propertyType, Type ownerType, PropertyMetadata metadata)
 {
     var prop = new DependencyProperty(name, propertyType, ownerType, metadata);
     attachedProperties.Add(prop);
     return prop;
 }