Fix MapControl placeholder text truncation at 200% text scaling #1990
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The "Map service token" placeholder text in the MapControl sample page was getting truncated when text scaling was set to 200%. This accessibility issue affected users with low vision who rely on text scaling features.
Root Cause
The PasswordBox control used a fixed
Width="200"which prevented the control from expanding to accommodate larger text when scaling was applied.Solution
Changed the PasswordBox from using a fixed width to
MinWidth="200", allowing the control to expand beyond 200 pixels when needed while maintaining the minimum width for normal text scaling scenarios.Technical Changes
WinUIGallery/Samples/ControlPages/MapControlPage.xamlline 39Width="200"toMinWidth="200"on the Map Service Token PasswordBoxThis approach is consistent with responsive design patterns used throughout the codebase and ensures the placeholder text remains fully visible at all text scaling levels without compromising the existing layout.
Testing
At 200% text scaling, the PasswordBox will now expand to provide sufficient space for the placeholder text to render completely, while maintaining the original 200px width at normal scaling levels.
Fixes #1951.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
e7bvsblobprodcus348.vsblob.vsassets.iodotnet restore WinUIGallery.sln(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.