how to work out with property *Matrix3DProj开发者_StackOverflowection" of an silver light popup ?
You would work with it the same way you'd work with any other projection. Here's an example:
<Popup Width="125" Height="100" Canvas.Left="500" Canvas.Top="300" IsOpen="True">
<Popup.Projection>
<Matrix3DProjection ProjectionMatrix="1, 0.25, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1" />
</Popup.Projection>
<Border BorderBrush="Black" BorderThickness="3" Width="125" Height="100" CornerRadius="10" >
<TextBlock>The pop up is skewed</TextBlock>
</Border>
</Popup>
You'll notice "0.25" in the M12 position. That skews it.
If you're asking how to work with Matrix3DProjection in general, it can get a little complex depending what you are trying to do. If you're trying to do more than scale, skew, rotate or translate, like perspective projection, then Matrix3DProjection is what you want. If you just need those one or more of those 4, then you should go with a MatrixTransform
instead inside of a RenderTransform
.
精彩评论