Camera Class
Collapse the table of content
Expand the table of content

Camera Class

Specifies what portion of the 3D scene is rendered by the Viewport3DVisual or Viewport3D element.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public ref class Camera abstract : public Animatable, 
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.

The Transform property enables the Camera to be positioned, oriented, and animated independently of the camera's derived type.

The following excerpt shows an instance of PerspectiveCamera.

  <Viewport3D Name="myViewport">

      <PerspectiveCamera FarPlaneDistance="20" LookDirection="5,-2,-3" UpDirection="0,1,0" NearPlaneDistance="0" Position="-5,2,3" FieldOfView="45" />

    <ModelVisual3D x:Name="topModelVisual3D">
            <DirectionalLight Color="#FFFFFFFF" Direction="-3,-4,-5" />

            <GeometryModel3D Geometry="{StaticResource myTeapot}">
                    <SolidColorBrush Color="Blue" Opacity="1.0" />
                    <AxisAngleRotation3D x:Name="myAngleRotation" Axis="0,3,0" Angle="1" />



      <EventTrigger RoutedEvent="Viewport3D.Loaded">
              From="0" To="360" Duration="0:0:10"
              RepeatBehavior="Forever" />


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

© 2015 Microsoft