Exemplo n.º 1
0
 private void SetCallBack(PropertyChangedCallbackDirect propertyChangedCallback)
 {
     PropertyChangedCallback = (o, args) =>
     {
         if (o is T control && control.IsLoaded)
         {
             propertyChangedCallback?.Invoke(control, args);
         }
     };
 }
Exemplo n.º 2
0
        public FrameworkPropertyMetadataNew(object defaultValue,
                                            PropertyChangedCallbackDirect propertyChangedCallback,
                                            bool twoWayBinding = true)
        {
            DefaultUpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            BindsTwoWayByDefault       = twoWayBinding;
            DefaultValue = defaultValue;

            SetCallBack(propertyChangedCallback);
        }