/// <summary> /// Handles changes to the Orientation property. /// </summary> /// <param name="d">FluidWrapPanel</param> /// <param name="e">DependencyProperty changed event arguments</param> private static void OnOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FluidWrapPanel panel = (FluidWrapPanel)d; Orientation oldOrientation = (Orientation)e.OldValue; Orientation newOrientation = panel.Orientation; panel.OnOrientationChanged(oldOrientation, newOrientation); }
private static void OnFluidElementsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FluidWrapPanel fwPanel = (FluidWrapPanel)d; List <UIElement> oldItemWidth = (List <UIElement>)e.OldValue; List <UIElement> newItemWidth = (List <UIElement>)e.NewValue; fwPanel.OnFluidElementsChanged(oldItemWidth, newItemWidth); }
/// <summary> /// Handles changes to the ItemsSource property. /// </summary> /// <param name="d">FluidWrapPanel</param> /// <param name="e">DependencyProperty changed event arguments</param> private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FluidWrapPanel panel = (FluidWrapPanel)d; IEnumerable oldItemsSource = (ObservableCollection <UIElement>)e.OldValue; IEnumerable newItemsSource = panel.ItemsSource; panel.OnItemsSourceChanged(oldItemsSource, newItemsSource); }
/// <summary> /// Handles changes to the ItemWidth property. /// </summary> /// <param name="d">FluidWrapPanel</param> /// <param name="e">DependencyProperty changed event arguments</param> private static void OnItemWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FluidWrapPanel fwPanel = (FluidWrapPanel)d; double oldItemWidth = (double)e.OldValue; double newItemWidth = fwPanel.ItemWidth; fwPanel.OnItemWidthChanged(oldItemWidth, newItemWidth); }
/// <summary> /// Handles changes to the IsComposing property. /// </summary> /// <param name="d">FluidWrapPanel</param> /// <param name="e">DependencyProperty changed event arguments</param> private static void OnIsComposingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FluidWrapPanel panel = (FluidWrapPanel)d; bool oldIsComposing = (bool)e.OldValue; bool newIsComposing = panel.IsComposing; panel.OnIsComposingChanged(oldIsComposing, newIsComposing); }
/// <summary> /// Handles changes to the ElementEasing property. /// </summary> /// <param name="d">FluidWrapPanel</param> /// <param name="e">DependencyProperty changed event arguments</param> private static void OnElementEasingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FluidWrapPanel panel = (FluidWrapPanel)d; EasingFunctionBase oldElementEasing = (EasingFunctionBase)e.OldValue; EasingFunctionBase newElementEasing = panel.ElementEasing; panel.OnElementEasingChanged(oldElementEasing, newElementEasing); }
/// <summary> /// Handles changes to the DragScale property. /// </summary> /// <param name="d">FluidWrapPanel</param> /// <param name="e">DependencyProperty changed event arguments</param> private static void OnDragScaleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FluidWrapPanel panel = (FluidWrapPanel)d; double oldDragScale = (double)e.OldValue; double newDragScale = panel.DragScale; panel.OnDragScaleChanged(oldDragScale, newDragScale); }