Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PlaneProjection Class

Silverlight

Represents a perspective transform (a 3-D-like effect) on an object.

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

public sealed class PlaneProjection : Projection
<PlaneProjection .../>

The PlaneProjection type exposes the following members.

  NameDescription
Public methodSupported by Silverlight for Windows PhonePlaneProjectionInitializes a new instance of the PlaneProjection class.
Top

  NameDescription
Public propertySupported by Silverlight for Windows PhoneCenterOfRotationXGets or sets the x-coordinate of the center of rotation of the object you rotate.
Public propertySupported by Silverlight for Windows PhoneCenterOfRotationYGets or sets the y-coordinate of the center of rotation of the object you rotate.
Public propertySupported by Silverlight for Windows PhoneCenterOfRotationZGets or sets the z-coordinate of the center of rotation of the object you rotate.
Public propertySupported by Silverlight for Windows PhoneDispatcherGets the Dispatcher this object is associated with. (Inherited from DependencyObject.)
Public propertySupported by Silverlight for Windows PhoneGlobalOffsetXGets or sets the distance the object is translated along the x-axis of the screen.
Public propertySupported by Silverlight for Windows PhoneGlobalOffsetYGets or sets the distance the object is translated along the y-axis of the screen.
Public propertySupported by Silverlight for Windows PhoneGlobalOffsetZGets or sets the distance the object is translated along the z-axis of the screen.
Public propertySupported by Silverlight for Windows PhoneLocalOffsetXGets or sets the distance the object is translated along the x-axis of the plane of the object.
Public propertySupported by Silverlight for Windows PhoneLocalOffsetYGets or sets the distance the object is translated along the y-axis of the plane of the object.
Public propertySupported by Silverlight for Windows PhoneLocalOffsetZGets or sets the distance the object is translated along the z-axis of the plane of the object.
Public propertySupported by Silverlight for Windows PhoneProjectionMatrixGets the projection matrix on the PlaneProjection.
Public propertySupported by Silverlight for Windows PhoneRotationXGets or sets the number of degrees to rotate the object around the x-axis of rotation.
Public propertySupported by Silverlight for Windows PhoneRotationYGets or sets the number of degrees to rotate the object around the y-axis of rotation.
Public propertySupported by Silverlight for Windows PhoneRotationZGets or sets the number of degrees to rotate the object around the z-axis of rotation.
Top

  NameDescription
Public methodSupported by Silverlight for Windows PhoneCheckAccessDetermines whether the calling thread has access to this object. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneClearValueClears the local value of a dependency property. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetAnimationBaseValueReturns any base value established for a Silverlight dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetValueReturns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.)
Protected methodSupported by Silverlight for Windows PhoneMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneReadLocalValueReturns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneSetValueSets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public fieldStatic memberSupported by Silverlight for Windows PhoneCenterOfRotationXPropertyIdentifies the CenterOfRotationX dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneCenterOfRotationYPropertyIdentifies the CenterOfRotationY dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneCenterOfRotationZPropertyIdentifies the CenterOfRotationZ dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneGlobalOffsetXPropertyIdentifies the GlobalOffsetX dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneGlobalOffsetYPropertyIdentifies the GlobalOffsetY dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneGlobalOffsetZPropertyIdentifies the GlobalOffsetZ dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneLocalOffsetXPropertyIdentifies the LocalOffsetX dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneLocalOffsetYPropertyIdentifies the LocalOffsetY dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneLocalOffsetZPropertyIdentifies the LocalOffsetZ dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneProjectionMatrixPropertyIdentifies the ProjectionMatrix dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneRotationXPropertyIdentifies the RotationX dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneRotationYPropertyIdentifies the RotationY dependency property.
Public fieldStatic memberSupported by Silverlight for Windows PhoneRotationZPropertyIdentifies the RotationZ dependency property.
Top

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

Image with perspective transform applied.

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 click 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

Shows stacking objects in 3d effect.

Besides creating static 3-D effects, you can animate the perspective transform properties to create moving 3-D effects.

Run this sample

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.

Run this sample

NoteNote:

Perspective transforms are not equivalent to a 3-D engine, however, they can be used to make 2-D Silverlight 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.

Run this sample


<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>


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft