-
Notifications
You must be signed in to change notification settings - Fork 693
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
Custom TitleBar is not work well in RTL #8671
Comments
I reported it in the wrong repo earlier with a video example: #8559 |
Does setting WS_EX_LAYOUTRTL and FlowDirection="RightToLeft" at the same time work? |
@DarranRowe The bug I reported earlier was in a very bad state, The title bar and caption buttons were not working. They fixed that bug . |
I would suggest using winappsdk 1.4 preview and see if it covers some of it. RTL in custom titlebar is still a in-progress issue but with merger with appwindow titlebar, 1.4 custom titlebar should be doing most of the heavy lifting of RTL display. can you test it out and let me know the experience ? Thanks |
@pratikone I gave it a test in my C# project and it no longer mismatches the buttons visible location from their hitboxes, however it behaves as if it were LTR. Is there a way to set the TitleBar layout/flow direction in the C# API? Also, in 1.2 when you didn't enable |
@pratikone i tested with 1.4-preview1 |
Thanks for providing these. It is very useful feedback towards a fully functional RTL. I will start exploring what other gaps here. @Avid29 we didn't change anything in that end for flow direction. Are you following https://learn.microsoft.com/en-us/windows/apps/design/globalizing/manage-language-and-region and have a RTL language in app manifest ? If it doesn't work after all that, I suggest opening a new issue as it is separate from custom titlebar related RTL issue. Would be better for tracking |
Tnx @pratikone |
we are working on a good api to act as source of truth for RTL. hang tight. meanwhile, calling WS_EX_LAYOUTRTL and FlowDirection="RightToLeft" on XamlRoot.Content is not fixing it entirely ? @ghost1372 I defintely suggest opening a new issue for the gap one so that we can track it separately. what other issues ppl are facing when they do *WS_EX_LAYOUTRTL and FlowDirection="RightToLeft" on XamlRoot.Content * |
Excellent, thank you. I hope that the new API will work for packaged and unpackage mode. i opened i new issue |
Describe the bug
Custom title bar doesn't work well in Right To Left layout
I used the code from the documentation
Below you can see the reaction of the title bar when layout is right to left with different methods:
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "fa-IR";
As you can see, the title does not stick to the right side and is as far as the CaptionButtons
2.
FlowDirection="RightToLeft"
As you can see, CaptionButtons and title are placed in each other
WS_EX_LAYOUTRTL
andSetWindowLong(hWnd, GWL_EXSTYLE, exstyle | WS_EX_LAYOUTRTL)
The drag regions are not correct and the title is still on the left side
WS_EX_LAYOUTRTL
andSetWindowLong(hWnd, GWL_EXSTYLE, exstyle | WS_EX_LAYOUTRTL)
andFlowDirection="RightToLeft"
Steps to reproduce the bug
create a winui 3 project + full titlebar customization
change your app to RTL layout with 3 methods
Expected behavior
Caption buttons should be on the left side, title and icon should be on the right side, Also, the title and icon should be placed on the right without spaces [see first image]
Screenshots
No response
NuGet package version
Windows App SDK 1.3.2: 1.3.230602002
Packaging type
Packaged (MSIX), Unpackaged
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response
The text was updated successfully, but these errors were encountered: