Freigeben über


UIElement.Projection Property

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

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

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

Syntax

'Declaration
Public Property Projection As Projection
public Projection Projection { get; set; }
<uiElement>
  <uiElement.Projection>
    singleProjection
  </uiElement.Projection>
</uiElement>

XAML Values

Property Value

Type: System.Windows.Media.Projection
The perspective projection to apply when rendering this UIElement. The default is nulla null reference (Nothing in Visual Basic) (no perspective applied).

Remarks

Dependency property identifier field: ProjectionProperty

Projection is the base class type that this property uses, but Projection does not implement a practical behavior. The existing practical Silverlight class that can be used for a projection effect is PlaneProjection.

Examples

The following example sets the Projection property to a PlaneProjection in order to rotate a StackPanel as if it is in 3-D space.

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

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.