register() static private method

static private register ( Type t, DependencyProperty dp ) : void
t Type
dp DependencyProperty
return void
Example #1
0
        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);
        }
Example #2
0
        public static DependencyProperty Register(string name, Type propertyType, Type ownerType,
                                                  PropertyMetadata typeMetadata,
                                                  ValidateValueCallback validateValueCallback)
        {
            if (typeMetadata == null)
            {
                typeMetadata = new PropertyMetadata();
            }

            DependencyProperty dp = new DependencyProperty(false, name, propertyType, ownerType,
                                                           typeMetadata, validateValueCallback);

            DependencyObject.register(ownerType, dp);

            dp.OverrideMetadata(ownerType, typeMetadata);

            return(dp);
        }