Question

Is it possible to get the scale used to stretch an image in Silverlight?

I have a image that i apply stretch.uniform on. When the browser window re-sizes, the image re-sizes as well. If it is possible to get the scale, other components can be transformed by this scale. Does anyone know how to get this?

Was it helpful?

Solution

The SizeChangedEventArgs (raised by the SizeChanged event) contains the members NewSize and PreviousSize. A little division and you're good to go.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top