예제 #1
0
        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;
            }
        }
예제 #3
0
        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();
            }
        }
예제 #4
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        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();
                }
            }
        }
예제 #8
0
        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);
        }
예제 #9
0
        private static void OnIsLoopingEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SlideView slideView = d as SlideView;

            slideView.InvalidateUI();
        }
예제 #10
0
        private static void OnTransitionModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SlideView view = d as SlideView;

            view.ResetManipulationBehavior();
        }
예제 #11
0
        /// <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();
        }
예제 #12
0
 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();
 }