microsoft / microsoft/microsoft-ui-xaml
Improve RTL Developer Scenarios for WinUI
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
Currently in WinUI, there is no easy way to handle RTL scenarios. If a RTL language is set on the OS, it is up to the developer to handle that event listener. They would have to set the `FlowDirection` property and update the language on the app.
There is little to no documentation explaining this developer experience gap nor the workaround. As a result, most apps are just not RTL friendly, and that is a huge gap in accessibility and inclusitivity.
This task includes:
- [ ] Improve documentation explaining the workaround in the interim.
- [ ] Investigate how to better improve RTL scenarios
- Whether the code should live in XamlWindow or elsewhere.
- How to check if the app has the correct language localized to mirror the OS settings. Windows developer guidelines state that if the default is a LTR language, it should not become RTL just to mirror the OS.
- [ ] Update AppWindow to automatically change captionButton orientation for RTL so developers don't have to use the Win32 workaround.
Internal Bug: 56332666, 56332722
### Screenshots

### NuGet package version
WinUI 3 - Windows App SDK 1.7 Preview 1: 1.7.250208002-preview1
### Windows version
Windows Insider Build (xxxxx)
### Additional context
_No response_
Contributor guide
Research direction
Start by reviewing the WinUI XamlWindow and AppWindow entry points, the FlowDirection behavior, and the existing Win32 workaround. Check the Windows developer guidance for localized RTL and LTR defaults. Done means documented interim guidance, a clear approach to OS language handling, and automatic RTL caption-button orientation in AppWindow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- accessibility, desktop, internationalization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100