Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make the UI responsive in Winforms [closed]

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.

like image 926
Vahid Avatar asked Mar 24 '14 10:03

Vahid


2 Answers

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.

like image 125
vfioox Avatar answered Sep 21 '22 22:09

vfioox


Another option would be using WPF for all your controls and layouting, and then use winforms host in WPF for your CAD application, you will have the benefits of WPF for responsiveness and you will get the performance for drawing with winforms.

like image 26
woutervs Avatar answered Sep 17 '22 22:09

woutervs