tags:

views:

41

answers:

1

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 recommendations applicable to my app. That allowed me to zoom in a bit deeper in the view but not enough...

A: 

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...

Laurent