コード例 #1
0
        public IDependencyProperty Register(string name, Type propertyType, Type ownerType, IPropertyMetadata typeMetadata)
        {
            var dp = new MemberDependencyProperty(name, propertyType, ownerType, typeMetadata);

            AddToRegistry(ownerType, dp);
            return(dp);
        }
コード例 #2
0
        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);
        }