Change the image height and width based on the scale?
Posted
by user281947
on Stack Overflow
See other posts from Stack Overflow
or by user281947
Published on 2010-06-12T14:39:49Z
Indexed on
2010/06/12
14:42 UTC
Read the original article
Hit count: 168
c#
|Silverlight
I want to resize the image height and width after setting its scale, below is what i am doing :
<Image x:Name="img" Source="sii.PNG" >
<Image.RenderTransform>
<ScaleTransform x:Name="scale" />
</Image.RenderTransform>
</Image>
below is the cs code :
void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
scale.ScaleX = scale.ScaleY =e.NewValue;
//here i have to change the height and width of an image
}
© Stack Overflow or respective owner