void HandleSwitchTo2D(object target, ExecutedRoutedEventArgs args) { if (visualTree3DView != null) { Target = this.target; visualTree3DView = null; ZScaleSlider.Visibility = Visibility.Collapsed; } }
void HandleSwitchTo3D(object target, ExecutedRoutedEventArgs args) { var visual = this.target as Visual; if (visualTree3DView == null && visual != null) { try { Mouse.OverrideCursor = Cursors.Wait; visualTree3DView = new VisualTree3DView(visual); Viewbox.Child = visualTree3DView; } finally { Mouse.OverrideCursor = null; } ZScaleSlider.Visibility = Visibility.Visible; } }
private void HandleSwitchTo3D(object target, ExecutedRoutedEventArgs args) { Visual visual = this.target as Visual; if (this.visualTree3DView == null && visual != null) { try { Mouse.OverrideCursor = Cursors.Wait; this.visualTree3DView = new VisualTree3DView(visual); this.Viewbox.Child = this.visualTree3DView; } finally { Mouse.OverrideCursor = null; } this.ZScaleSlider.Visibility = Visibility.Visible; } }
private void HandleSwitchTo2D(object target, ExecutedRoutedEventArgs args) { if (this.visualTree3DView != null) { this.Target = this.target; this.visualTree3DView = null; this.ZScaleSlider.Visibility = Visibility.Collapsed; } }