Tuesday, June 9, 2009

Xaml Using Transformations

Transformations are defined in a TransformGroup block Consisting of one or more of the following :

  • ScaleTransform
  • SkewTransform
  • RotateTransform
  • TranslateTransform

    The following codeshows the basic framework needed to apply transformations on an image control:

<image.rendertransform>
<transformgroup>
<scaletransform/>
<skewtransform/>
<rotatetransform/>
<translatetransform/>
</transformgroup>
<image.rendertransform/>

The centre point of the translation is based off the RenderTransformOrigin property of the control and this is based on two coordinates points.To render around the centre of the control, the following code is set for that:
RenderTransformOrigin=”0.5,0.5”

No comments:

Post a Comment