silverlight的TranslateTransform 的使用

注意TransformGroup Blend自动创建,红色可缩写为 <TranslateTransform X="-30" Y="20"/>

  <Canvas x:Name="LayoutRoot" Background="White">
        <Rectangle Stroke="#FF000000" RadiusX="5" RadiusY="5" Height="200" Width="200" Canvas.Left="200" Canvas.Top="100"/>
        <Rectangle Stroke="#FF000000" RadiusX="5" RadiusY="5" RenderTransformOrigin="0.5,0.5" Height="200" Width="200" Canvas.Left="200" Canvas.Top="100">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform X="-30" Y="20"/>
                </TransformGroup>
            </Rectangle.RenderTransform>
        </Rectangle>
    </Canvas>

 

 
                               

posted @ 2010-05-19 22:32  回忆过去  阅读(480)  评论(0编辑  收藏  举报