diff --git a/src/Files.App/Views/MainPage.xaml.cs b/src/Files.App/Views/MainPage.xaml.cs index a1818549983c..e30c47270200 100644 --- a/src/Files.App/Views/MainPage.xaml.cs +++ b/src/Files.App/Views/MainPage.xaml.cs @@ -134,7 +134,18 @@ private void UserSettingsService_OnSettingChangedEvent(object sender, SettingCha private void HorizontalMultitaskingControl_Loaded(object sender, RoutedEventArgs e) { - horizontalMultitaskingControl.DragArea.SizeChanged += (_, _) => SetRectDragRegion(); + // WINUI3: bad workaround to be removed asap! + // SetDragRectangles() does not work on windows 10 with winappsdk "1.2.220902.1-preview1" + if (Environment.OSVersion.Version.Build >= 22000) + { + horizontalMultitaskingControl.DragArea.SizeChanged += (_, _) => SetRectDragRegion(); + } + else + { + App.Window.AppWindow.TitleBar.ExtendsContentIntoTitleBar = false; + App.Window.ExtendsContentIntoTitleBar = true; + App.Window.SetTitleBar(horizontalMultitaskingControl.DragArea); + } if (!(ViewModel.MultitaskingControl is HorizontalMultitaskingControl)) {