예제 #1
0
        public static TriggerState UpdateState(InteractivityObject interactivityObject, InteractivityProperty sourceProperty, ref object sourceStore, InteractivityProperty valueProperty, ref object valueStore, ITriggerValueComparer comparer)
        {
            var actualComparer = comparer ?? XamlValueComparer.TriggerComparer;

            var sourceValue = interactivityObject.GetValue(sourceProperty, ref sourceStore);
            var value       = interactivityObject.CacheConvert(valueProperty, sourceValue?.GetType(), ref valueStore);

            return(actualComparer.Compare(sourceValue, value) ? TriggerState.Opened : TriggerState.Closed);
        }
예제 #2
0
 public InteractivityBindingProxy(InteractivityObject interactivityObject, InteractivityProperty property, NativeBinding binding, DependencyObject dataObject) : base(binding, dataObject)
 {
     _interactivityObjectWeak = new WeakReference(interactivityObject);
     _property         = property;
     _cacheStore.Value = Value;
 }