Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey people, how can I scroll to zoom in a panel in C#?, for a better understanding I'm painting some rectangles in a panel, but they draw in the panel's own coordinate system, how can I redefine the panel coordinate system, and zoom-in and zoom-out in that panel..., thanks, and excuse me for my language, is not the best...
Posted
Comments
Sergey Alexandrovich Kryukov 6-Oct-14 18:00pm    
It all depends on what do you call Panel. Full type name, please. Of course one can implement zoom, no doubt about it.
You language is good enough to be understood, the problem is incomplete information.
—SA

I am pretty sure you can't. A panel is just not for that. It's coordiate system has the same metrics as the parent canvas.

You can however resize all controls inside, like described here: http://www.nullskull.com/q/10026602/zooming-a-group-of-controlsedited.aspx[^]. Still, this won't zoom the content of the controls.

If the child elements are just primitives drawn on a canvas, you could try this one: ImageBox Control with Zoom/Pan Capability[^]
 
Share this answer
 
Please see my past answer: Zoom image in C# .net mouse wheel[^].

If you use some different .NET library for UI, please clarify. (Please see my comment to the question.)

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900