Пример #1
0
        private static void OnPopoutDistanceChanged(DependencyObject d,
                                                    DependencyPropertyChangedEventArgs e)
        {
            ElementFlow ef = d as ElementFlow;

            ef.ReflowItems();
        }
Пример #2
0
        private static void OnCurrentViewChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ElementFlow   ef      = d as ElementFlow;
            ViewStateBase newView = e.NewValue as ViewStateBase;

            if (newView == null)
            {
                throw new ArgumentNullException("e", "The CurrentView cannot be null");
            }
            newView.SetOwner(ef);
            ef.ReflowItems();
        }
Пример #3
0
        private static void OnCameraChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ElementFlow ef = d as ElementFlow;

            PerspectiveCamera camera = e.NewValue as PerspectiveCamera;

            if (camera == null)
            {
                throw new ArgumentNullException("e", "The Camera cannot be null");
            }

            ef._viewport.Camera = camera;
        }
Пример #4
0
        private static void OnSelectedIndexChanged(DependencyObject d,
                                                   DependencyPropertyChangedEventArgs e)
        {
            ElementFlow ef = d as ElementFlow;

            if (ef.IsLoaded == false)
            {
                return;
            }

            int oldIndex = (int)e.OldValue;
            int newIndex = (int)e.NewValue;

            //            Console.WriteLine("old:{0} new:{1} selected:{2}" , oldIndex, newIndex,ef.SelectedIndex);

            ef.SelectItemCore(newIndex);
            if (oldIndex != newIndex && ef.SelectedIndexChanged != null)
            {
                ef.SelectedIndexChanged(ef, new EventArgs());
            }
        }
Пример #5
0
        private static void OnFrontItemGapChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ElementFlow ef = d as ElementFlow;

            ef.ReflowItems();
        }
Пример #6
0
        private static void OnTiltAngleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ElementFlow cf = d as ElementFlow;

            cf.ReflowItems();
        }