Skip to content

Commit

Permalink
Fix CoreWindow creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Clrs17 committed Nov 7, 2023
1 parent 06f8284 commit 4b0889e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CoreAppUWP/Pages/SettingsPages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
Description="Create a new CoreWindow."
Header="CoreWindow"
IsClickEnabled="True"
IsEnabled="{x:Bind IsCoreWindow}"

Style="{StaticResource ClickableSettingExpanderItemStyle}"
Tag="NewWindow" />
<controls:Setting
Expand Down
4 changes: 2 additions & 2 deletions CoreAppUWP/Pages/SettingsPages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ private async void Button_Click(object sender, RoutedEventArgs e)
else if (this.GetWindowForElement() is DesktopWindow desktopWindow)
{ desktopWindow.AppWindow.SetPresenter(AppWindowPresenterKind.CompactOverlay); }
break;
case "NewWindow" when IsCoreWindow:
case "NewWindow":
_ = await WindowHelper.CreateWindowAsync(window =>
{
if (SettingsHelper.Get<bool>(SettingsHelper.IsExtendsTitleBar))
{ CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true; }
Frame _frame = new();
window.Content = _frame;
ThemeHelper.Initialize(window);
_ = _frame.Navigate(typeof(MainPage), null, new DrillInNavigationTransitionInfo());
_ = _frame.Navigate(typeof(MainPage));
BackdropHelper.SetBackdrop(window, SettingsHelper.Get<BackdropType>(SettingsHelper.SelectedBackdrop));
});
break;
Expand Down

0 comments on commit 4b0889e

Please sign in to comment.