Skip to main content

Microsoft Silverlight

Answered Question Centered zoom problemRSS Feed

(0)

silverlightOnly
silverli...

Member

Member

14 points

6 Posts

Centered zoom problem

Since my post in Programming went unanswered for more than two weeks and I have not seen any working code on the subject, I'll consider this a bug.
Problem is related to pan + zoom transformations. There is something wrong with centered zoom (scale) after a pan (translation). My code example is with RenderTransformOrigin centering, but ScaleTransform.CenterX/CenterY was tested as well without success.

Please take a look at the code:
http://silverlight.net/forums/p/51139/134135.aspx

StefanWick
StefanWick

Contributor

Contributor

2864 points

438 Posts

Microsoft

Re: Centered zoom problem

I have replied to your post on the other thread.

Thanks, Stefan Wick

Microsoft Silverlight | http://blogs.msdn.com/swick/

silverlightOnly
silverli...

Member

Member

14 points

6 Posts

Re: Centered zoom problem

 Thank you Stefan, but I dont think we are close to any solution yet. I replied on the other thread too.

StefanWick
StefanWick

Contributor

Contributor

2864 points

438 Posts

Microsoft
Answered Question

Re: Centered zoom problem

I have posted a modified, working version of your sample here:

http://blogs.msdn.com/swick/pages/pan-zoom-example.aspx

Thanks, Stefan Wick

Microsoft Silverlight | http://blogs.msdn.com/swick/

silverlightOnly
silverli...

Member

Member

14 points

6 Posts

Re: Centered zoom problem

Stefan, your code is perfect and solves the problem beautifully. There is still a lingering question on why the matrix version didn't work, but as long as there is an alternative with separate transformations - I'm happy. Thank you very much for your time and knowledge !

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities