简体   繁体   English

windows手机7格性能

[英]windows phone 7 grid performance

I have a scene in my app where I have a grid of around 5000x5000, however, it only has a few elements in it, say 5 or 6 images which are 256x256 and some Path objects overlayed on the images.我的应用程序中有一个场景,其中我有一个大约 5000x5000 的网格,但是它只有几个元素,比如 5 或 6 个 256x256 的图像和一些覆盖在图像上的路径对象。

I have implemented the pinch gesture listener from the SL toolkit, on the grid, but performance seems to be slow when I scale up and down the scene.我已经在网格上实现了 SL 工具包中的捏合手势监听器,但是当我放大和缩小场景时性能似乎很慢。

I appreciate that such a large grid seems excessive but is required, trust me.我很欣赏这么大的网格似乎过分但是必需的,相信我。

However, I think I could re-write my scene using a Canvas instead of a Grid, but I would like to know if in the long run, the canvas will draw faster when I scale it up and down and even translating it left and right (like a map control).但是,我想我可以使用 Canvas 而不是 Grid 来重写我的场景,但我想知道从长远来看,canvas 是否会在我上下缩放甚至左右平移时绘制得更快(如 map 控件)。

The multiscale image control seems to get such wonderful performance with pinching and translating.多尺度图像控制似乎通过捏合和平移获得了如此出色的性能。 I have tried to inspect it using reflector, but I cant seem to identify how it does it as it seems to use native code.我曾尝试使用反射器对其进行检查,但我似乎无法确定它是如何工作的,因为它似乎使用了本机代码。

Any help here would be greatly appreciated.在这里的任何帮助将不胜感激。

This is a perfect case for using the MultiScaleImage with a custom MultiScaleTileSource.这是将 MultiScaleImage 与自定义 MultiScaleTileSource 一起使用的完美案例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM