Replies: 1 comment
-
It won't be a problem right now, since Avalonia will render it as is on any device. I.e. if your window width is 400, and button width is 100, it should always take the same 1/4 space on any resolution. But from practice, you shouldn't hardcode sizes for your controls. It will be a problem, once you start localizing your UI (different languages have different word lengths), or once you start making your UI size responsive or window resizable (it's not now, but might be in the future). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On some of my non-resizable dialog windows, I have some controls that I set to a fixed size (usually textboxes and buttons). Is there any problem with this? Will this show correctly on a range of resolutions? I tested a few resolutions and didn't see a problem, but I'm new to Avalonia and don't want to shoot myself in the foot. For buttons in particular I want to have a standard width and height, but for textboxes I just want a width that makes sense for the expected input length.
On searching I find some people saying to never set any sizes, but how would you get anything like a standard button size without setting sizes explicitly (or via a Style Selector) ?
Beta Was this translation helpful? Give feedback.
All reactions