Dela via


SpotLight.CoordinateSpace Property

Definition

The Visual used to determine the light's direction and offset. The light's offset and direction properties are relative to this Visual's coordinate space. SpotLight.CoordinateSpace is a required property. If SpotLight.CoordinateSpace is not set, the SpotLight will not render.

public:
 property Visual ^ CoordinateSpace { Visual ^ get(); void set(Visual ^ value); };
Visual CoordinateSpace();

void CoordinateSpace(Visual value);
public Visual CoordinateSpace { get; set; }
var visual = spotLight.coordinateSpace;
spotLight.coordinateSpace = visual;
Public Property CoordinateSpace As Visual

Property Value

The visual the light's offset is relative to.

Examples

_spotLight.CoordinateSpace = root;  

Remarks

SpotLight.Offset and SpotLight.Direction are relative to Spotlight.CoordiateSpace . Every Visual has an implicit 3D coordinate space, defined in this way:

X-axis runs from the left edge to the right edge of the visual.  Y-axis runs from the top of the visual to the bottom.  Z-axis is perpandicular to the visual.

X direction is from left to right. Y direction is from top to bottom. Z direction is pointing out of the plane. The original point of this coordinate is the upper-left corner of the visual, and the unit is DIP. A light’s offset and direction are defined in this coordinate.

Applies to

See also