开发者

Performance problem when applying a RenderTransform to a Viewport3d in WPF

I have implemented zooming and panning in my WPF app using a RenderTranform combining scaling and translations.

Everything is peachy with bitmaps, text, graphic paths, shapes and more. As soon as I put a viewport3d in the visual tree and I zoom into the picture, performance drops to terrible (non-interactive!) levels.

Any suggestions?

I have already read this page http://msdn.microsoft.com/en-us/library/bb613553.aspx and followed all recomm开发者_开发百科endations applicable to my app. That allowed me to zoom in a bit deeper in the view but not enough...


I solved the problem using Cached Composition.

I had to place the Viewport3d into a canvas and use the following code:

    CacheMode = new BitmapCache() 
{ EnableClearType = true, RenderAtScale = 1, SnapsToDevicePixels = true },

Doing the same thing on the viewport itself did not work...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜