Exemplo n.º 1
0
        public static DependencyProperty RegisterAttached <T>(PropertyMetadata defaultMetadata = null, ValidateValueCallback validateValueCallback = null, [CallerMemberName] string dpName = null)
        {
            var propertyName = GetPropertyName(PropertyRegex, dpName);
            var ownerType    = ExTool.GetDeclaringType();

            return(DependencyProperty.RegisterAttached(propertyName, typeof(T), ownerType, defaultMetadata, validateValueCallback));
        }
Exemplo n.º 2
0
        public static DependencyPropertyKey RegisterReadOnly(PropertyMetadata typeMetadata = null, ValidateValueCallback validateValueCallback = null, [CallerMemberName] string dpName = null)
        {
            var propertyName = GetPropertyName(PropertyKeyRegex, dpName);
            var ownerType    = ExTool.GetDeclaringType();

            return(DependencyProperty.RegisterReadOnly(propertyName, GetPropertyType(ownerType, propertyName), ownerType, typeMetadata, validateValueCallback));
        }
Exemplo n.º 3
0
 public static void Override(this DependencyPropertyKey dpKey, PropertyMetadata typeMetadata)
 {
     dpKey.DependencyProperty.OverrideMetadata(ExTool.GetDeclaringType(), typeMetadata, dpKey);
 }
Exemplo n.º 4
0
 public static void Override(this DependencyProperty dp, PropertyMetadata typeMetadata)
 {
     dp.OverrideMetadata(ExTool.GetDeclaringType(), typeMetadata);
 }