示例#1
0
 public DependencyPropertyKey RegisterReadOnly <T>(
     Getter <T> getter,
     Setter <T> setter,
     DependencyPropertyUtilities <TComponent> .CastedPropertyChangedCallback propertyChangedCallback,
     DependencyPropertyUtilities <TComponent> .CastedCoerceValueCallback <T>?coerceValueCallback     = null,
     DependencyPropertyUtilities <TComponent> .CastedValidateValueCallback <T>?validateValueCallback = null)
 {
     return(RegisterReadOnly(
                getter,
                setter,
                DependencyPropertyUtilities <TComponent> .CreatePropertyMetadata(propertyChangedCallback, coerceValueCallback),
                validateValueCallback));
 }
示例#2
0
 public DependencyProperty Register <T>(
     Getter <T> getter,
     Setter <T> setter,
     T defaultValue,
     DependencyPropertyUtilities <TComponent> .CastedPropertyChangedCallback?propertyChangedCallback = null,
     DependencyPropertyUtilities <TComponent> .CastedCoerceValueCallback <T>?coerceValueCallback     = null,
     DependencyPropertyUtilities <TComponent> .CastedValidateValueCallback <T>?validateValueCallback = null)
 {
     return(Register(
                getter,
                setter,
                DependencyPropertyUtilities <TComponent> .CreatePropertyMetadata(defaultValue, propertyChangedCallback, coerceValueCallback),
                validateValueCallback));
 }
示例#3
0
 public DependencyPropertyKey RegisterReadOnly <T>(
     Getter <T> getter,
     Setter <T> setter,
     T defaultValue,
     FrameworkPropertyMetadataOptions flags,
     DependencyPropertyUtilities <TComponent> .CastedPropertyChangedCallback?propertyChangedCallback = null,
     DependencyPropertyUtilities <TComponent> .CastedCoerceValueCallback <T>?coerceValueCallback     = null,
     bool isAnimationProhibited = false,
     UpdateSourceTrigger?defaultUpdateSourceTrigger = null,
     DependencyPropertyUtilities <TComponent> .CastedValidateValueCallback <T>?validateValueCallback = null)
 {
     return(RegisterReadOnly(
                getter,
                setter,
                DependencyPropertyUtilities <TComponent> .CreateFrameworkPropertyMetadata(
                    defaultValue,
                    flags,
                    propertyChangedCallback,
                    coerceValueCallback,
                    isAnimationProhibited,
                    defaultUpdateSourceTrigger),
                validateValueCallback));
 }
示例#4
0
 public DependencyProperty Register <T>(Getter <T> getter, Setter <T> setter, PropertyMetadata defaultMetadata, DependencyPropertyUtilities <TComponent> .CastedValidateValueCallback <T>?validateValueCallback)
 {
     return(DependencyProperty.RegisterAttached(GetPropertyName(getter, setter), typeof(T), this.OwnerType, defaultMetadata, DependencyPropertyUtilities <TComponent> .DownCast(validateValueCallback)));
 }