@@ -26,6 +26,7 @@ public sealed partial class MainPage : Page
2626 private IGeneralSettingsService generalSettingsService { get ; } = Ioc . Default . GetRequiredService < IGeneralSettingsService > ( ) ;
2727 public IUserSettingsService UserSettingsService { get ; }
2828 private readonly IWindowContext WindowContext = Ioc . Default . GetRequiredService < IWindowContext > ( ) ;
29+ private readonly IRealTimeLayoutService RealTimeLayoutService = Ioc . Default . GetRequiredService < IRealTimeLayoutService > ( ) ;
2930 public ICommandManager Commands { get ; }
3031 public SidebarViewModel SidebarAdaptiveViewModel { get ; }
3132 public MainPageViewModel ViewModel { get ; }
@@ -47,9 +48,6 @@ public MainPage()
4748 ViewModel = Ioc . Default . GetRequiredService < MainPageViewModel > ( ) ;
4849 OngoingTasksViewModel = Ioc . Default . GetRequiredService < StatusCenterViewModel > ( ) ;
4950
50- if ( FilePropertiesHelpers . FlowDirectionSettingIsRightToLeft )
51- FlowDirection = FlowDirection . RightToLeft ;
52-
5351 ViewModel . PropertyChanged += ViewModel_PropertyChanged ;
5452 UserSettingsService . OnSettingChangedEvent += UserSettingsService_OnSettingChangedEvent ;
5553
@@ -137,9 +135,8 @@ private void HorizontalMultitaskingControl_Loaded(object sender, RoutedEventArgs
137135
138136 private int SetTitleBarDragRegion ( InputNonClientPointerSource source , SizeInt32 size , double scaleFactor , Func < UIElement , RectInt32 ? , RectInt32 > getScaledRect )
139137 {
140- var rtls = Ioc . Default . GetRequiredService < IRealTimeLayoutService > ( ) ;
141138 var height = ( int ) TabControl . ActualHeight ;
142- var x = rtls . FlowDirection == FlowDirection . LeftToRight ? 0 : ( int ) TabControl . ActualWidth ;
139+ var x = RealTimeLayoutService . FlowDirection == FlowDirection . LeftToRight ? 0 : ( int ) TabControl . ActualWidth ;
143140 var width = ( int ) ( TabControl . ActualWidth + TabControl . Margin . Left - TabControl . DragArea . ActualWidth ) ;
144141
145142 source . SetRegionRects ( NonClientRegionKind . Passthrough , [ getScaledRect ( this , new RectInt32 ( x , 0 , width , height ) ) ] ) ;
0 commit comments