title: Wpf3d Zooming for window
body: <p>I am trying to implement zoom functionality to my wpf 3d object. It is working fine when I trigger it from my object. But I want to do this functionality for my whole space including the object. How can I implement this zooming functionality for the whole window so if I mouse wheel from any place of window, my object will be zoom in and azoom out.
  Here is my code for MouseWheel Event:</p>
  
  <pre><code>    private void Grid_MouseWheel(object sender, MouseWheelEventArgs e)
      {
         TheCamera.Position = new Point3D((TheCamera.Position.X - e.Delta / 360D), (TheCamera.Position.Y - e.Delta / 360D), (TheCamera.Position.Z - e.Delta / 360D));
      }
  </code></pre>
  
  <p>Here is my xaml code,</p>
  
  <p>`
      </p>
  
  <pre><code>    &lt;Viewport3D x:Name="MainViewport"&gt;
          &lt;Viewport3D.Camera&gt;
              &lt;PerspectiveCamera x:Name="TheCamera" Position="-40,40,40" LookDirection="40,-40,-40 " 
                       UpDirection="0,0,1" /&gt;
          &lt;/Viewport3D.Camera&gt;
          &lt;ModelVisual3D&gt;
              &lt;ModelVisual3D.Content&gt;
                  &lt;Model3DGroup&gt;
                      &lt;DirectionalLight Color="White" Direction="-1,-1,-3" /&gt;
                      &lt;GeometryModel3D x:Name="mGeo"&gt;
                          &lt;GeometryModel3D.Geometry&gt;
                              &lt;MeshGeometry3D Positions="0,0,0 10,0,0 10,10,0 0,10,0 0,0,10 
                      10,0,10 10,10,10 0,10,10"
                      TriangleIndices="0 1 3 1 2 3  0 4 3 4 7 3  4 6 7 4 5 6 
                                       0 4 1 1 4 5  1 2 6 6 5 1  2 3 7 7 6 2"/&gt;
                          &lt;/GeometryModel3D.Geometry&gt;
                          &lt;GeometryModel3D.Material&gt;
                              &lt;DiffuseMaterial Brush="Red"/&gt;
                          &lt;/GeometryModel3D.Material&gt;
                      &lt;/GeometryModel3D&gt;
                  &lt;/Model3DGroup&gt;
              &lt;/ModelVisual3D.Content&gt;
          &lt;/ModelVisual3D&gt;
      &lt;/Viewport3D&gt;
  
  &lt;/Grid&gt;
  </code></pre>
  
  <p>`</p>