PlaneProjection Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Represents a perspective transform (a 3-D-like effect) on an object.
System.Windows::DependencyObject
System.Windows.Media::Projection
System.Windows.Media::PlaneProjection
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
The PlaneProjection type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | CenterOfRotationX | Gets or sets the x-coordinate of the center of rotation of the object you rotate. |
![]() | CenterOfRotationY | Gets or sets the y-coordinate of the center of rotation of the object you rotate. |
![]() | CenterOfRotationZ | Gets or sets the z-coordinate of the center of rotation of the object you rotate. |
![]() | Dispatcher | Gets the Dispatcher this object is associated with. (Inherited from DependencyObject.) |
![]() | GlobalOffsetX | Gets or sets the distance the object is translated along the x-axis of the screen. |
![]() | GlobalOffsetY | Gets or sets the distance the object is translated along the y-axis of the screen. |
![]() | GlobalOffsetZ | Gets or sets the distance the object is translated along the z-axis of the screen. |
![]() | LocalOffsetX | Gets or sets the distance the object is translated along the x-axis of the plane of the object. |
![]() | LocalOffsetY | Gets or sets the distance the object is translated along the y-axis of the plane of the object. |
![]() | LocalOffsetZ | Gets or sets the distance the object is translated along the z-axis of the plane of the object. |
![]() | ProjectionMatrix | Gets the projection matrix on the PlaneProjection. |
![]() | RotationX | Gets or sets the number of degrees to rotate the object around the x-axis of rotation. |
![]() | RotationY | Gets or sets the number of degrees to rotate the object around the y-axis of rotation. |
![]() | RotationZ | Gets or sets the number of degrees to rotate the object around the z-axis of rotation. |
| Name | Description | |
|---|---|---|
![]() | CheckAccess | Determines whether the calling thread has access to this object. (Inherited from DependencyObject.) |
![]() | ClearValue | Clears the local value of a dependency property. (Inherited from DependencyObject.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetAnimationBaseValue | Returns any base value established for a Windows Phone dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetValue | Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ReadLocalValue | Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.) |
![]() | SetValue | Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | CenterOfRotationXProperty | Identifies the CenterOfRotationX dependency property. |
![]() ![]() | CenterOfRotationYProperty | Identifies the CenterOfRotationY dependency property. |
![]() ![]() | CenterOfRotationZProperty | Identifies the CenterOfRotationZ dependency property. |
![]() ![]() | GlobalOffsetXProperty | Identifies the GlobalOffsetX dependency property. |
![]() ![]() | GlobalOffsetYProperty | Identifies the GlobalOffsetY dependency property. |
![]() ![]() | GlobalOffsetZProperty | Identifies the GlobalOffsetZ dependency property. |
![]() ![]() | LocalOffsetXProperty | Identifies the LocalOffsetX dependency property. |
![]() ![]() | LocalOffsetYProperty | Identifies the LocalOffsetY dependency property. |
![]() ![]() | LocalOffsetZProperty | Identifies the LocalOffsetZ dependency property. |
![]() ![]() | ProjectionMatrixProperty | Identifies the ProjectionMatrix dependency property. |
![]() ![]() | RotationXProperty | Identifies the RotationX dependency property. |
![]() ![]() | RotationYProperty | Identifies the RotationY dependency property. |
![]() ![]() | RotationZProperty | Identifies the RotationZ dependency property. |
This class is used to create a perspective transform (a 3-D effect) on an object. For example, you can create the illusion that an object is rotated toward or away from you.
Image with perspective transform

Although the preceding illustration shows a perspective transform applied to a simple image, you can apply one to any UIElement, including controls. For example, you could apply the effect to a Grid that in turn contains a TextBox and Button. Despite the controls being rotated, the user could type into the TextBox and tap the Button (assuming the controls are visible).
Another common scenario for using perspective transforms is to arrange objects in relation to one another to create a 3-D effect, as shown in the following illustration.
Stacking objects to create a 3-D effect

Besides creating static 3-D effects, you can animate the perspective transform properties to create moving 3-D effects.
PlaneProjection has 12 properties you can use to control the rotation and positioning of an object: RotationX, RotationY, RotationZ, CenterOfRotationX, CenterOfRotationY, CenterOfRotationZ, GlobalOffsetX, GlobalOffsetY, GlobalOffsetZ, LocalOffsetX, LocalOffsetY, and LocalOffsetZ. The following sample allows you to experiment with these properties.
Note: |
|---|
Perspective transforms are not equivalent to a 3-D engine, however, they can be used to make 2-D content appear as if it is drawn on a 3-D plane. |
To apply a perspective transform to a UIElement, set the UIElement object's Projection property to a PlaneProjection. The PlaneProjection defines how the transform is rendered in space. The following example shows a simple case.
<StackPanel Margin="35" Background="Gray"> <StackPanel.Projection> <PlaneProjection RotationX="-35" RotationY="-35" RotationZ="15" /> </StackPanel.Projection> <TextBlock Margin="10">Type Something Below</TextBlock> <TextBox Margin="10"></TextBox> <Button Margin="10" Content="Click" Width="100" /> </StackPanel>





Note: