Compartir a través de


PlaneProjection.GlobalOffsetX Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the distance the object is translated along the x-axis of the screen.

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

Syntax

'Declaration
Public Property GlobalOffsetX As Double
public double GlobalOffsetX { get; set; }
<PlaneProjection GlobalOffsetX="double"/>

Property Value

Type: System.Double
The distance the object is translated along the x-axis of the screen.

Remarks

Dependency property identifier field: GlobalOffsetXProperty

The GlobalOffsetX, GlobalOffsetY, and GlobalOffsetZ properties translate the object along axes relative to the screen. That is, unlike LocalOffsetX, LocalOffsetY, and LocalOffsetZ, the axis the object moves along is independent of any rotation applied to the object. These global offset properties are useful when you want to simply move the object along the x-, y-, or z-axis of the screen without worrying about the rotation applied to the object.

The following sample animates GlobalOffsetX from 0 to 400 and RotationY from 0 to 65 degrees.

Run this sample

Notice in the preceding sample that the object does not change course as it rotates. That is because the object is being moved along the x-axis of the screen without regard to its rotation.

The following sample allows you to experiment with the different global offset properties.

Run this sample

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

Platforms

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