Windows Vista Forums

Zooming to mouse position
  1. #1


    Bruno Guest

    Zooming to mouse position

    Hello all,

    I am trying to zoom to the mouse position in WPF. I have tried using a
    viewbox and scaletransform. With the scaletransform I set the origin to the
    mouseposition but when the origin changes (mouse moved) the zoomed elements
    jump to another location. The viewbox gave the same problems.

    Actually I just need a canvas with objects inside (like rectangles or
    textboxes) and zoom the whole canvas arround the position of the mouse. Like
    google maps or a similar application. It zooms to the location that your
    mouse is hovering over.



    Thanks!

      My System SpecsSystem Spec

  2. #2


    Bruno Guest

    RE: Zooming to mouse position

    I managed to get it work using a Matrix and MatrixTransformation. When
    scaling use the Matrix.ScaleAtPrepend function.

    "Bruno" wrote:

    > Hello all,
    >
    > I am trying to zoom to the mouse position in WPF. I have tried using a
    > viewbox and scaletransform. With the scaletransform I set the origin to the
    > mouseposition but when the origin changes (mouse moved) the zoomed elements
    > jump to another location. The viewbox gave the same problems.
    >
    > Actually I just need a canvas with objects inside (like rectangles or
    > textboxes) and zoom the whole canvas arround the position of the mouse. Like
    > google maps or a similar application. It zooms to the location that your
    > mouse is hovering over.
    >
    > Thanks!

      My System SpecsSystem Spec

Zooming to mouse position problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Zooming after connecting to a projector Mary Vista General 0 21 Feb 2008
Problem with unwanted zooming in chrisk Vista General 1 24 Aug 2007
Panning & Zooming with VisualBrush/Viewbox Tobias Vandenbempt Avalon 1 26 Apr 2007
Zooming in Explorer Chester GS Vista General 1 04 Mar 2007
Zooming an image John Lorenzen Avalon 2 14 Mar 2006