コード例 #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
ファイル: InteractivityProperty.cs プロジェクト: Egaros/lib
 public InteractivityBindingProxy(InteractivityObject interactivityObject, InteractivityProperty property, NativeBinding binding, DependencyObject dataObject) : base(binding, dataObject)
 {
     _interactivityObjectWeak = new WeakReference(interactivityObject);
     _property         = property;
     _cacheStore.Value = Value;
 }