コード例 #1
0
 void HandleSwitchTo2D(object target, ExecutedRoutedEventArgs args)
 {
     if (visualTree3DView != null)
     {
         Target                  = this.target;
         visualTree3DView        = null;
         ZScaleSlider.Visibility = Visibility.Collapsed;
     }
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
ファイル: Zoomer.xaml.cs プロジェクト: noamkfir/snoopwpf
 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;
     }
 }
コード例 #4
0
ファイル: Zoomer.xaml.cs プロジェクト: noamkfir/snoopwpf
 private void HandleSwitchTo2D(object target, ExecutedRoutedEventArgs args)
 {
     if (this.visualTree3DView != null)
     {
         this.Target = this.target;
         this.visualTree3DView = null;
         this.ZScaleSlider.Visibility = Visibility.Collapsed;
     }
 }