Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How best can I create a panel which allows zoom on a drawing?

1 view
Skip to first unread message

steve

unread,
May 9, 2008, 7:48:27 AM5/9/08
to

I would like to create a panel, or other widget, on which I can draw,
say, a triangle, and use the wheel on the mouse to zoom in and out on
the drawing. A vector drawing.

I know this can be done because I have seen apps that do this. They
were 3D and I only need 2D but they were very fast.

Is there an easy way to do this? Do I need to use the DirectX
libraries to do this?

Any pointer in the right direction would be very welcome and hopefully
save me much time.

Thanks,

Steve

Marc Gravell

unread,
May 9, 2008, 8:05:56 AM5/9/08
to
I wonder if your best approach might be to use WPF to render the area?
This natively supports scaleable vector-based graphics - you'd just need
to add the mouse hooks... Try searching for +WPF +zoom

Marc

steve

unread,
May 9, 2008, 8:50:49 AM5/9/08
to

Thanks. My original app was written using Windows Forms. Is there an
easy way to convert to WPF?

Steve

Chris Dunaway

unread,
May 9, 2008, 9:41:43 AM5/9/08
to

Check out this site:

http://www.bobpowell.net

and this link in particular:

http://www.bobpowell.net/zoompicbox.htm

Chris

Marc Gravell

unread,
May 9, 2008, 9:57:42 AM5/9/08
to
Not really, but you can embed WPF in WinForm (via ElementHost) and
WinForm in WPF (via WindowsFormsHost).

However, depending on the complexity, the zooming picturebox (that Chris
mentions) looks interesting.

Marc

steve

unread,
May 9, 2008, 11:23:27 AM5/9/08
to

thanks, I will have to play around with it a bit to see how it would
work for what I want.

Steve

0 new messages