private static void OnPopoutDistanceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ElementFlow ef = d as ElementFlow; ef.ReflowItems(); }
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(); }
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; }
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()); } }
private static void OnFrontItemGapChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ElementFlow ef = d as ElementFlow; ef.ReflowItems(); }
private static void OnTiltAngleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ElementFlow cf = d as ElementFlow; cf.ReflowItems(); }