public static DependencyProperty Register <PT, OT>(string name, PropertyMetadata defaultMetadata)
 {
     return(Register(name, typeof(PT), typeof(OT), defaultMetadata));
 }
        public static DependencyProperty Register(string name, Type propertyType, Type ownerType, PropertyMetadata defaultMetadata)
        {
            var property = new DependencyProperty(Guid.NewGuid())
            {
                Name            = name,
                PropertyType    = propertyType,
                OwnerType       = ownerType,
                DefaultMetadata = defaultMetadata
            };

            lock (_properties)
                _properties.Add(property);
            return(property);
        }