如何放大面板 [英] How can I zoom in a panel

查看:126
本文介绍了如何放大面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿嘿,我怎么滚动来放大C#中的面板?为了更好地理解我在面板中绘制一些矩形,但是它们在面板自己的坐标系中绘制,我该如何重新定义面板坐标系统,并在该面板中放大和缩小...,谢谢,并原谅我的语言,不是最好的...

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

推荐答案

我很确定你做不到。专家组不是为了那个。它的协调系统与父画布具有相同的指标。



然而,您可以调整内部的所有控件,如下所述: http://www.nullskull.com/q/10026602/zooming-a-group-of-controlsedited.aspx [ ^ ]。但是,这不会缩放控件的内容。



如果子元素只是在画布上绘制的基元,你可以试试这个:具有缩放/平移功能的ImageBox控件 [ ^ ]
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[^]


请参阅我之前的回答:使用C#.net鼠标缩放图像轮 [ ^ ]。



如果您使用一些不同的.NET库用于UI,请澄清。 (请参阅我对该问题的评论。)



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


这篇关于如何放大面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆