public IDependencyProperty Register(string name, Type propertyType, Type ownerType, IPropertyMetadata typeMetadata)
        {
            var dp = new MemberDependencyProperty(name, propertyType, ownerType, typeMetadata);

            AddToRegistry(ownerType, dp);
            return(dp);
        }
        public IDependencyPropertyKey RegisterReadOnly(string name, Type propertyType, Type ownerType, IPropertyMetadata typeMetadata)
        {
            var dp = new MemberDependencyProperty(name, propertyType, ownerType, typeMetadata);

            AddToRegistry(ownerType, dp);
            var key = dp.MakeReadOnly();

            return(key);
        }