No Window.FlowDirection support for desktop applications
See original GitHub issueWinUI XAML does not support FlowDirection
or equivalent attribute on the Window
element. Additionally, the Window
class does not contain a FlowDirection
property for programmatic access.
This impacts developers migrating from WPF XAML or WinRT XAML and overall global readiness.
Potential workaround:
// ...
var native_window = managed_window.As<IWindowNative>();
var extended_style = GetWindowLong(native_window.WindowHandle, GWL_EXSTYLE);
SetWindowLong(native_window.WindowHandle, GWL_EXSTYLE, extended_style | WS_EX_LAYOUTRTL);
managed_window.Activate();
// ...
Steps to reproduce the bug
- File > New > WinUI 3 blank desktop packaged application
- Attempt to add
FlowDirection=FlowDirection.RightToLeft
attribute to root Window element inMainWindow.xaml
- Observe error
Expected behavior Easy way to enable RTL support via XAML and programmatically.
Version Info NuGet package version: Microsoft.WinUI 3.0.0-preview4.210210.4
Windows app type:
UWP | Win32 |
---|---|
Yes |
Windows 10 version | Saw the problem? |
---|---|
Insider Build (21313) | Yes |
October 2020 Update (19042) | |
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 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
FlowDirection Enum (Windows.UI.Xaml) - UWP
Indicates that content should flow from right to left. Remarks. The FlowDirection enumeration is used as a value by the FrameworkElement.FlowDirection property.
Read more >FlowDirection Enum (System.Windows)
Defines constants that specify the content flow direction for text and user interface (UI) elements.
Read more >Setting FlowDirection to RightToLeft for all windows in an ...
Try to set static FlowDirection property to your app static property Windows::UI::Xaml::FlowDirection FlowDirection{ ...
Read more >Flow Direction (Spatial Analyst)—ArcMap | Documentation
This tool supports parallel processing. If your computer has multiple processors or processors with multiple cores, better performance may be achieved, ...
Read more >Flow Direction (Spatial Analyst)—ArcGIS Pro | Documentation
This tool supports parallel processing. If your computer has multiple processors or processors with multiple cores, better performance may be achieved, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@riverar, you are right this is basic funtionality that should be there, but it requires a new APIs, and new APIs is a feature request.
any news on this item?