Scale Image control using ScaleTransform in Silverlight

The following code scales Image control to twice the initial size:

<Image Source=”image.jpg”
Height=”200” Width=”300”
RenderTransformOrigin=”0.5,0.5” >
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=”2” ScaleY=”2”/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Grid.RenderTransform>
</Image>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.