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

Text is set to Justify Alignment by default in the new themes #10223

Open
aquinn39 opened this issue Jan 4, 2025 · 0 comments · May be fixed by #10242
Open

Text is set to Justify Alignment by default in the new themes #10223

aquinn39 opened this issue Jan 4, 2025 · 0 comments · May be fixed by #10242
Assignees
Labels
🚧 work in progress Investigate Requires further investigation by the WPF team. Win 11 Theming

Comments

@aquinn39
Copy link

aquinn39 commented Jan 4, 2025

Description

In the new Windows 11 based themes, text is set to Justify Alignment by default. This default does not make sense and has never been the case in WPF and is not the default in UWP. In English it should be left aligned.

Default:
Image

Explicitly setting it to Left:
Image

Reproduction Steps

Create a new WPF project and add a TextBox to the UI, add some text to it. Enable fluent themes in the project as described here: https://github.com/dotnet/core/blob/main/release-notes/9.0/preview/preview4/wpf.md#support-for-windows-11-theming.
You will see that the text is using Justify, even though it says it is using left alignment in the properties UI in Visual Studio.

Expected behavior

Text is left aligned or aligned according to the default for the language.

Actual behavior

Text is Justify aligned by default in English, when it should be left aligned.

Regression?

Yes, doesn't happen in .NET 8 or with the old themes.

Known Workarounds

Excplicitly set the text alignment to Left.

Impact

Looks strange and makes text harder to read.

Configuration

  • .NET 9
  • Windows 11 23H2 Build 22631.4602
  • x64
  • I am not sure if it is specific to this configuration.

Other information

No response

@harshit7962 harshit7962 added the Investigate Requires further investigation by the WPF team. label Jan 6, 2025
@siagupta0202 siagupta0202 self-assigned this Jan 8, 2025
@siagupta0202 siagupta0202 linked a pull request Jan 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚧 work in progress Investigate Requires further investigation by the WPF team. Win 11 Theming
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants