Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RadioButton and CheckBox titles do not resize properly #371

Open
rdurfee opened this issue Aug 17, 2024 · 0 comments
Open

RadioButton and CheckBox titles do not resize properly #371

rdurfee opened this issue Aug 17, 2024 · 0 comments

Comments

@rdurfee
Copy link
Contributor

rdurfee commented Aug 17, 2024

Describe the bug
RadioButton and CheckBox use StackLayout as the base for their controls.

In .NET MAUI, StackLayout no longer constrains to the size of its container. It is recommended to use Grid instead of StackLayout. This will eliminate the issues with the label not reacting to sizing and orientation changes, and it will also fix the issues with LineBreakMode with WordWrap and TailTruncation.

To Reproduce
Steps to reproduce the behavior:

  • Launch the Sandbox MAUI app in Windows
  • Open the Checkbox page
  • Resize the Window smaller and note that the checkbox titles shrink in width
  • Resize the Window bigger and note that the checkbox titles do not expand
  • On a Surface tablet, changing the orientation from landscape to portrait, the labels will shrink
  • Change the orientation back to landscape, and the labels do not expand
  • Change the orientation back to portrait again and the labels shrink even further in width
  • The same behavior happens on iPad or iPhone when changing the screen orientation

Expected behavior
When the size of the window changes, or the orientation changes, the radio/checkbox text should adjust accordingly. Setting LineBreakMode to TailTrunction should work properly.

Desktop (please complete the following information):

  • I verified this issue happens on iOS, MacCatalyst, and WinUI.

Smartphone (please complete the following information):

  • I verified this issue happens on iOS 16, MacOS 14, and Windows 11.

Additional context
I have created a PR #372 to fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant