<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


   (c) Copyright Microsoft Corporation.
   This source is subject to the Microsoft Limited Permissive License.
   See http://www.microsoft.com/resources/sharedsource/licensingbasics/limitedpermissivelicense.mspx
   All other rights reserved.
  
   This file is part of the 3D Tools for Windows Presentation Foundation
   project.  For more information, see:
   
   http://CodePlex.com/Wiki/View.aspx?ProjectName=3DTools



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<UserControl x:Class="_3DTools.Trackport3D"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Loaded="OnLoaded"
    VerticalContentAlignment="Stretch"
    HorizontalContentAlignment="Stretch"
    >
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Border Background="DarkBlue">
      <Viewport3D Grid.Row="0" Grid.Column="0" Name="Viewport" ClipToBounds="True">

        <!--
              NOTE: In order for the Headlight feature to work the Camera
                    and DirectionalLight should have the same initial
                    orientation.  (Default direction for both is "0,0,-1")
          -->

        <Viewport3D.Camera>
          <PerspectiveCamera x:Name="Camera" Position="0,0,5"  />
        </Viewport3D.Camera>
        <Viewport3D.Children>
          <ModelVisual3D>
            <ModelVisual3D.Content>
              <Model3DGroup>
                <AmbientLight x:Name="AmbientLight" Color="Black" />
                <DirectionalLight x:Name="Headlight" Color="White" />
              </Model3DGroup>
            </ModelVisual3D.Content>
          </ModelVisual3D>
          <ModelVisual3D x:Name="Root" />
        </Viewport3D.Children>
      </Viewport3D>
    </Border>
    <Border Name="CaptureBorder" Background="Transparent" Grid.Row="0" Grid.Column="0" />
  </Grid>
</UserControl>
