microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.31k stars 676 forks source link

FlowDirection is based on system language instead of app language #4891

Open soumyamahunt opened 3 years ago

soumyamahunt commented 3 years ago

Describe the bug Many apps provide users option to change app language from the app itself rather than changing system language. But if the system language is LTR type and app language is RTL type then the control FlowDiection is kept LTR instead of RTL.

Steps to reproduce the bug

  1. Keep system language to any language that supports LTR layout.
  2. Implement a sample app with changing app language functionality.
  3. Change the app language to RTL type.
  4. Restart app and see the error.

Expected behavior The flow direction should respect app language instead of system language.

Screenshots ApplicationFrameHost_aO3PffFEJJ

Version Info

NuGet package version: WinUI 3 - Project Reunion 0.5: 0.5.5

Windows app type: UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042) Yes
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context

Right now the solution is manually setting flow direction by detecting required value from Windows.ApplicationModel.Resources.Core.ResourceContext.GetForCurrentView().QualifierValues["LayoutDirection"]

StephenLPeters commented 3 years ago

This seems like a good change. @chrisglein and @MikeHillberg FYI

chrisglein commented 3 years ago

@kmelmon Do you happen to know if this is true for UWP apps? (that the app language will override the system language direction and produce correct RTL behavior) Trying to figure out if this is a result of WinUI3 desktop window or a gap that already existed in UWP.

Jay-o-Way commented 1 year ago

Is this still an issue with the latest version?