Viewport3D::Camera Property
Gets or sets a camera object that projects the 3-D contents of the Viewport3D to the 2-D surface of the Viewport3D.
Assembly: PresentationFramework (in PresentationFramework.dll)
Property Value
Type: System.Windows.Media.Media3D::Camera^The camera that projects the 3-D contents to the 2-D surface.
This property represents the viewing projection of the 3-D scene.
Identifier field | |
Metadata properties set to true | None |
Note |
|---|
The metadata type on this dependency property is PropertyMetadata, not FrameworkPropertyMetadata. |
The following example shows setting the Camera property of a Viewport3D using code. To see the entirety of the code from which this excerpt was taken, see How to: Create a 3-D Scene.
The following example shows setting the Camera property of a Viewport3D using Extensible Application Markup Language (XAML). To see the entirety of the code from which this excerpt was taken, see How to: Create a 3-D Scene.
<!-- Add a camera. --> <Viewport3D.Camera> <PerspectiveCamera FarPlaneDistance="20" LookDirection="5,-2,-3" UpDirection="0,1,0" NearPlaneDistance="1" Position="-5,2,3" FieldOfView="45" /> </Viewport3D.Camera>
Available since 3.0
