方向更改后的图像处理尺寸WP7 [英] Handling size of image after orientation change WP7

查看:80
本文介绍了方向更改后的图像处理尺寸WP7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个图像,它的画布上覆盖了一些矩形,这些矩形的位置与图像的大小有关.当我更改手机方向时会出现问题,因为图像大小会更改(或至少会更改渲染),但我无法根据新大小重新分配矩形,而OrientationChanged事件对我没有帮助,因为在渲染图像之前将其触发(因此所有矩形都移至(0,0))

I've got an Image with an overlay Canvas with some rectangles whose position is relative to image's size. The problem comes when I change the phone orientation, because image size changes (or at least, the renderization) but I can't manage to re-distribute the rectangles according to the new size, and the OrientationChanged event doesn't help me because it's fired before rendering the image (so all the rectangles go to (0,0))

任何人都可以帮助我找到正确的事件吗?

Anyone can help me finding the correct event?

推荐答案

终于知道了!

我正在寻找的事件是SizeChanged,我无法想象我以前没有看到过...

The event I was looking for was the SizeChanged, I can't imagine how I didn't see it before...

这篇关于方向更改后的图像处理尺寸WP7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆