Thursday, 15 July 2010

c# - Why is ActualWidth/ActualHeight don't changed after performing RenderTransform? -



c# - Why is ActualWidth/ActualHeight don't changed after performing RenderTransform? -

i have next code resize image control

private void applyscale() { ((compositetransform)img.rendertransform).scalex = totalimagescale; ((compositetransform)img.rendertransform).scaley = totalimagescale; debug.writeline("img.width: " + img.width.tostring() + " - img.actualwidth: " + img.actualwidth.tostring()); debug.writeline("img.height: " + img.height.tostring() + " - img.actualheight: " + img.actualheight.tostring()); }

while code works properly, trying understand why image actualwidth , actualheight not alter after scaling. same width , height values.

how new image command size? have calculate manually via scale alter ratio?

rendertransform isn't supposed effect layout, if changed actualsize. if utilize layouttransform should alter these values, relatively simple calculation find new size old size , scale factors.

c# windows-phone-8 scale rendertransform actualwidth

No comments:

Post a Comment