File tree Expand file tree Collapse file tree 6 files changed +6
-12
lines changed
Properties/PublishProfiles
UserControls/MultitaskingControl Expand file tree Collapse file tree 6 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1212 <PublishSingleFile >False</PublishSingleFile >
1313 <PublishReadyToRun Condition =" '$(Configuration)' == 'Debug'" >False</PublishReadyToRun >
1414 <PublishReadyToRun Condition =" '$(Configuration)' != 'Debug'" >True</PublishReadyToRun >
15+ <PublishReadyToRunComposite Condition =" '$(Configuration)' != 'Debug'" >True</PublishReadyToRunComposite >
1516 <!--
1617 See https://github.com/microsoft/CsWinRT/issues/373
1718 <PublishTrimmed>True</PublishTrimmed>
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1212 <PublishSingleFile >False</PublishSingleFile >
1313 <PublishReadyToRun Condition =" '$(Configuration)' == 'Debug'" >False</PublishReadyToRun >
1414 <PublishReadyToRun Condition =" '$(Configuration)' != 'Debug'" >True</PublishReadyToRun >
15+ <PublishReadyToRunComposite Condition =" '$(Configuration)' != 'Debug'" >True</PublishReadyToRunComposite >
1516 <!--
1617 See https://github.com/microsoft/CsWinRT/issues/373
1718 <PublishTrimmed>True</PublishTrimmed>
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1212 <PublishSingleFile >False</PublishSingleFile >
1313 <PublishReadyToRun Condition =" '$(Configuration)' == 'Debug'" >False</PublishReadyToRun >
1414 <PublishReadyToRun Condition =" '$(Configuration)' != 'Debug'" >True</PublishReadyToRun >
15+ <PublishReadyToRunComposite Condition =" '$(Configuration)' != 'Debug'" >True</PublishReadyToRunComposite >
1516 <!--
1617 See https://github.com/microsoft/CsWinRT/issues/373
1718 <PublishTrimmed>True</PublishTrimmed>
Original file line number Diff line number Diff line change @@ -30,10 +30,8 @@ public HorizontalMultitaskingControl()
3030 tabHoverTimer . Interval = TimeSpan . FromMilliseconds ( 500 ) ;
3131 tabHoverTimer . Tick += TabHoverSelected ;
3232
33- var flowDirectionSetting = new Microsoft . Windows . ApplicationModel . Resources . ResourceManager ( ) . CreateResourceContext ( ) . QualifierValues [ "LayoutDirection" ] ;
34-
3533 var appWindowTitleBar = App . GetAppWindow ( App . Window ) . TitleBar ;
36- double rightPaddingColumnWidth = flowDirectionSetting is "RTL" ? appWindowTitleBar . LeftInset : appWindowTitleBar . RightInset ;
34+ double rightPaddingColumnWidth = FilePropertiesHelpers . FlowDirectionSettingIsRightToLeft ? appWindowTitleBar . LeftInset : appWindowTitleBar . RightInset ;
3735 RightPaddingColumn . Width = new GridLength ( rightPaddingColumnWidth >= 0 ? rightPaddingColumnWidth : 0 ) ;
3836 }
3937
Original file line number Diff line number Diff line change @@ -173,13 +173,7 @@ public BaseShellPage(CurrentInstanceViewModel instanceViewModel)
173173
174174 DisplayFilesystemConsentDialog ( ) ;
175175
176- // TODO:
177- // ResourceContext.GetForCurrentView and ResourceContext.GetForViewIndependentUse do not exist in Windows App SDK
178- // Use your ResourceManager instance to create a ResourceContext as below.If you already have a ResourceManager instance,
179- // replace the new instance created below with correct instance.
180- // Read: https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/guides/mrtcore
181- var flowDirectionSetting = new Microsoft . Windows . ApplicationModel . Resources . ResourceManager ( ) . CreateResourceContext ( ) . QualifierValues [ "LayoutDirection" ] ;
182- if ( flowDirectionSetting == "RTL" )
176+ if ( FilePropertiesHelpers . FlowDirectionSettingIsRightToLeft )
183177 FlowDirection = FlowDirection . RightToLeft ;
184178
185179 ToolbarViewModel . ToolbarPathItemInvoked += ShellPage_NavigationRequested ;
Original file line number Diff line number Diff line change @@ -66,8 +66,7 @@ public MainPage()
6666 ViewModel = Ioc . Default . GetRequiredService < MainPageViewModel > ( ) ;
6767 OngoingTasksViewModel = Ioc . Default . GetRequiredService < OngoingTasksViewModel > ( ) ;
6868
69- var flowDirectionSetting = new ResourceManager ( ) . CreateResourceContext ( ) . QualifierValues [ "LayoutDirection" ] ;
70- if ( flowDirectionSetting == "RTL" )
69+ if ( FilePropertiesHelpers . FlowDirectionSettingIsRightToLeft )
7170 FlowDirection = FlowDirection . RightToLeft ;
7271
7372 UserSettingsService . OnSettingChangedEvent += UserSettingsService_OnSettingChangedEvent ;
You can’t perform that action at this time.
0 commit comments