So we wanted to have a custom keyboard on a winforms (it will run on a touch screen computer) so I quickly made one as a Custom UserControl so we can later re-use it if necessary. Here's how it looks now:
We'd also want it to scale if we'd have to resize it in the future. How can I make sure, when I resize my main UserControl (the keyboard itself, not any of the keys), the buttons sizes will all stay relative? So for example if I resized the keyboard to be 25% bigger (length & width), all my buttons would also have to resize that amount. So there'd have to be some empty space left between the buttons as you can see in the previous image.
Right now I've tried playing with the Anchor & Dock properties of the buttons and the UserControl, autosize and their size but I couldn't find the correct configuration that I wanted, unfortunately.
Does anyone know how I can resize my custom UserControl keyboard, while also relatively resizing my buttons inside it?
EDIT: So for example, if I increased the height of the entire UserControl by 100% (say 100px -> 200px), I'd want my 3 buttons "Tab", "Caps Lock" and "Shift" to now also fill those 200px in height, so "stretch" them for example. Same for width. So if I'd change the UserControl by 50% height & width, I'd want my buttons to change as well relatively to howmuch my UserControl has changed. So if width was changed +100%, I'd still want it filled horizontally with all my buttons. If only width/height is change it will stretch of course.