private void OnAssociatedObjectLoaded(object sender, RoutedEventArgs e) { IncrementalUpdater incrementalUpdater = this.FindUpdater(); if (incrementalUpdater != null) { incrementalUpdater.CachePhaseElement(this.AssociatedObject, this.Phase); } }
private void OnAssociatedObjectLoaded(object sender, RoutedEventArgs e) { IncrementalUpdater incrementalUpdater = this.FindUpdater(); FrameworkElement frameworkElement = (FrameworkElement)this.associatedObject; if (incrementalUpdater != null && frameworkElement != null) { incrementalUpdater.CachePhaseElement(frameworkElement, this.Phase); } }
private static void OnPhaseChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { IncrementalUpdateBehavior behavior = (IncrementalUpdateBehavior)sender; IncrementalUpdater incrementalUpdater = behavior.FindUpdater(); FrameworkElement frameworkElement = behavior.associatedObject as FrameworkElement; if (incrementalUpdater != null && frameworkElement != null) { incrementalUpdater.UncachePhaseElement(frameworkElement, (int)args.OldValue); incrementalUpdater.CachePhaseElement(frameworkElement, (int)args.NewValue); } }