private static void OnItemPreviewTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SlideView slideView = d as SlideView; slideView.itemPreviewTemplateCache = e.NewValue as DataTemplate; slideView.InvalidateUI(); }
/// <summary> /// Occurs when the behavior has been detached from a previously attached <see cref="RadSlideView"/> instance. /// </summary> /// <param name="oldView"></param> protected override void OnDetached(SlideView oldView) { base.OnDetached(oldView); if (oldView.Panel != null) { oldView.Panel.RenderTransform = null; } }
private static void OnRealizationModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SlideView slideView = d as SlideView; slideView.realizationModeCache = (SlideViewItemRealizationMode)e.NewValue; if (slideView.itemsPanel != null) { slideView.itemsPanel.Reset(); } }
private static void OnAdjacentItemsPreviewModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SlideView slideView = d as SlideView; slideView.adjacentItemsPreviewModeCache = (SlideViewAdjacentItemsPreviewMode)e.NewValue; if (slideView.itemsPanel != null) { slideView.itemsPanel.Reset(); } }
internal void Detach() { if (this.view == null) { return; } SlideView oldView = this.view; this.view = null; this.OnDetached(oldView); }
private static void OnClipMarginChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SlideView slideView = d as SlideView; slideView.clipMarginCache = (Thickness)e.NewValue; if (!slideView.IsProperlyTemplated) { return; } slideView.UpdateClip(slideView.ActualWidth, slideView.ActualHeight); }
private static void OnOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SlideView slideView = d as SlideView; slideView.orientationCache = (Orientation)e.NewValue; if (slideView.itemsPanel != null) { slideView.itemsPanel.InvalidateMeasure(); if (slideView.manipulationBehavior != null) { slideView.manipulationBehavior.ResetCache(); } } }
private static void OnSelectedItemChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SlideView slideView = d as SlideView; if (!slideView.IsProperlyTemplated) { return; } if (!slideView.changePropertySilently) { if (e.NewValue == null) { throw new ArgumentNullException("SelectedItem"); } slideView.selectedDataSourceItem = slideView.ListSource.FindItem(e.NewValue); slideView.itemsPanel.InvalidateUI(); } slideView.NotifySelectionChanged(e); }
private static void OnIsLoopingEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SlideView slideView = d as SlideView; slideView.InvalidateUI(); }
private static void OnTransitionModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SlideView view = d as SlideView; view.ResetManipulationBehavior(); }
/// <summary> /// Occurs when the behavior has been detached from a previously attached <see cref="RadSlideView"/> instance. /// </summary> /// <param name="oldView"></param> protected override void OnDetached(SlideView oldView) { base.OnDetached(oldView); oldView.TransitionLayer.Children.Clear(); }
internal void Attach(SlideView view) { this.view = view; }
/// <summary> /// Occurs when the behavior has been detached from a previously attached <see cref="RadSlideView"/> instance. /// </summary> /// <param name="oldView"></param> protected virtual void OnDetached(SlideView oldView) { }
internal void Attach(SlideView view) { this.view = view; this.OnAttached(); }