Share via


UIElement.Projection Property

Definition

Gets or sets the perspective projection (3-D effect) to apply when rendering this element.

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

void Projection(Projection value);
public Projection Projection { get; set; }
var projection = uIElement.projection;
uIElement.projection = projection;
Public Property Projection As Projection
<uiElement>
  <uiElement.Projection>
    singleProjection
  </uiElement.Projection>
</uiElement>

Property Value

A 3-D projection effect applied to the element.

Examples

This example shows how to apply a basic PlaneProjection in the initial page XAML.

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

Remarks

Projection and RenderTransform with a SkewTransform can achieve similar results, a Projection is probably more versatile, especially if you want a sense of perspective change applied to the element.

Projection is the base class type that this property uses, but Projection does not implement a practical behavior. Use either Matrix3DProjection or PlaneProjection.

The value of Projection is overridden by PointerDownThemeAnimation and PointerUpThemeAnimation.

Applies to

See also