如何在Winforms中使UI响应 [英] How to make the UI responsive in Winforms

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

问题描述

与大多数最初学习 Winforms 然后迁移到 WPF 的人相反,我是相反的!由于某些有关图形性能的原因,我必须使用Winforms。但我仍停留在第一步。如何使 UI 像WPF一样响应。在Winforms中相当于 Grids

Instead of most of you guys who first learned Winforms then moved to WPF, I'm the opposite! For some reasons regarding the graphic performance I have to use Winforms. But I'm stuck at the first step. How can I make the UI responsive like WPF. What is the equivalent of Grids in Winforms. Any help is highly appreciated.

推荐答案

如果说响应是指在所有屏幕分辨率上工作,则可以使用面板和停靠控件内。通过将正确的控件组合固定在面板中,固定在主窗体中,您可以获得一个不错的设计,该设计将自动适合所有屏幕。您还可以使用Anchor属性将控件粘贴到例如右上角(默认情况下始终为左上角)。至少我是从您的问题中了解到的。

If by responsive you mean working on all screen resolutions, you can use panels, and dock controls inside. With a correct mix of controls docked in panels, docked in the main form, you can get a nice design which will automatically fit on all screens. You can also use Anchor property to make a control "stick" to for example top right corner(by default it's always top-left). At least that's what I understood from your question.

这篇关于如何在Winforms中使UI响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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