Exemplo n.º 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;
            }
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
                }
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 9
0
        private static void OnIsLoopingEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SlideView slideView = d as SlideView;

            slideView.InvalidateUI();
        }
Exemplo n.º 10
0
        private static void OnTransitionModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SlideView view = d as SlideView;

            view.ResetManipulationBehavior();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
 }