diff --git a/GZStudio.Core/GZStudio.Core.csproj b/GZStudio.Core/GZStudio.Core.csproj index 68e10c3..0f23dd9 100644 --- a/GZStudio.Core/GZStudio.Core.csproj +++ b/GZStudio.Core/GZStudio.Core.csproj @@ -1,6 +1,6 @@  - net7.0 + net9.0 GZStudio.Core AnyCPU;x64;x86 x86;x64;arm64;AnyCPU diff --git a/GZStudio/App.xaml.cs b/GZStudio/App.xaml.cs index 7566d16..c9db21a 100644 --- a/GZStudio/App.xaml.cs +++ b/GZStudio/App.xaml.cs @@ -47,6 +47,7 @@ public partial class App : Application { InitializeComponent(); + Host = Microsoft.Extensions.Hosting.Host. CreateDefaultBuilder(). UseContentRoot(AppContext.BaseDirectory). @@ -99,9 +100,14 @@ public partial class App : Application protected async override void OnLaunched(LaunchActivatedEventArgs args) { + MainWindow.AppWindow.TitleBar.ExtendsContentIntoTitleBar = true; + MainWindow.AppWindow.TitleBar.ButtonBackgroundColor = Microsoft.UI.Colors.Transparent; + base.OnLaunched(args); + // cancel notification // App.GetService().Show(string.Format("AppNotificationSamplePayload".GetLocalized(), AppContext.BaseDirectory)); + await App.GetService().ActivateAsync(args); } diff --git a/GZStudio/GZStudio.csproj b/GZStudio/GZStudio.csproj index a4db4cc..bec3d9a 100644 --- a/GZStudio/GZStudio.csproj +++ b/GZStudio/GZStudio.csproj @@ -1,19 +1,21 @@  WinExe - net7.0-windows10.0.22621.0 + net9.0-windows10.0.26100.0 10.0.17763.0 GZStudio Assets/WindowIcon.ico app.manifest x86;x64;arm64 win10-x86;win10-x64;win10-arm64 + true Properties\PublishProfiles\win10-$(Platform).pubxml enable enable true true true + 10.0.26100.0 @@ -28,7 +30,7 @@ - + @@ -49,4 +51,9 @@ true + + + 10.0.26100.38 + + diff --git a/GZStudio/Styles/Thickness.xaml b/GZStudio/Styles/Thickness.xaml index 96ef0c9..318f9a3 100644 --- a/GZStudio/Styles/Thickness.xaml +++ b/GZStudio/Styles/Thickness.xaml @@ -25,7 +25,7 @@ 1,1,0,0 8,0,0,0 - 0,48,0,0 + 0,0,0,0 56,34,0,0 56,24,56,0 diff --git a/GZStudio/Views/ShellPage.xaml b/GZStudio/Views/ShellPage.xaml index aefa2f4..32ee0b4 100644 --- a/GZStudio/Views/ShellPage.xaml +++ b/GZStudio/Views/ShellPage.xaml @@ -1,5 +1,6 @@  - - - - + + + + + + + TODO: Update item icons by updating FontIcon.Glyph properties. + https://docs.microsoft.com/windows/apps/design/style/segoe-fluent-icons-font#icon-list + --> @@ -58,20 +52,20 @@ + Text="{Binding}" + Style="{ThemeResource TitleTextBlockStyle}" /> + DefaultHeader="{x:Bind ((ContentControl)ViewModel.Selected).Content, Mode=OneWay}"> + Text="{Binding}" + Style="{ThemeResource TitleTextBlockStyle}" /> diff --git a/GZStudio/Views/ShellPage.xaml.cs b/GZStudio/Views/ShellPage.xaml.cs index fec95d0..bc688dc 100644 --- a/GZStudio/Views/ShellPage.xaml.cs +++ b/GZStudio/Views/ShellPage.xaml.cs @@ -12,6 +12,8 @@ using Windows.System; namespace GZStudio.Views; // TODO: Update NavigationViewItem titles and icons in ShellPage.xaml. + + public sealed partial class ShellPage : Page { public ShellViewModel ViewModel @@ -33,9 +35,22 @@ public sealed partial class ShellPage : Page App.MainWindow.ExtendsContentIntoTitleBar = true; App.MainWindow.SetTitleBar(AppTitleBar); App.MainWindow.Activated += MainWindow_Activated; - AppTitleBarText.Text = "AppDisplayName".GetLocalized(); + //AppTitleBarText.Text = "AppDisplayName".GetLocalized(); + //AppTitleBar.Loaded += MyTitleBar_Loaded; } + //private void MyTitleBar_Loaded(object sender, RoutedEventArgs e) + //{ + // // Parts get delay loaded. If you have the parts, make them visible. + // VisualStateManager.GoToState(AppTitleBar, "SubtitleTextVisible", false); + // VisualStateManager.GoToState(AppTitleBar, "HeaderVisible", false); + // VisualStateManager.GoToState(AppTitleBar, "ContentVisible", false); + // VisualStateManager.GoToState(AppTitleBar, "FooterVisible", false); + + // // Run layout so we re-calculate the drag regions. + // AppTitleBar.InvalidateMeasure(); + //} + private void OnLoaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) { TitleBarHelper.UpdateTitleBar(RequestedTheme); @@ -46,18 +61,18 @@ public sealed partial class ShellPage : Page private void MainWindow_Activated(object sender, WindowActivatedEventArgs args) { - App.AppTitlebar = AppTitleBarText as UIElement; + //App.AppTitlebar = AppTitleBarText as UIElement; } private void NavigationViewControl_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args) { - AppTitleBar.Margin = new Thickness() - { - Left = sender.CompactPaneLength * (sender.DisplayMode == NavigationViewDisplayMode.Minimal ? 2 : 1), - Top = AppTitleBar.Margin.Top, - Right = AppTitleBar.Margin.Right, - Bottom = AppTitleBar.Margin.Bottom - }; + //AppTitleBar.Margin = new Thickness() + //{ + // Left = sender.CompactPaneLength * (sender.DisplayMode == NavigationViewDisplayMode.Minimal ? 2 : 1), + // Top = AppTitleBar.Margin.Top, + // Right = AppTitleBar.Margin.Right, + // Bottom = AppTitleBar.Margin.Bottom + //}; } private static KeyboardAccelerator BuildKeyboardAccelerator(VirtualKey key, VirtualKeyModifiers? modifiers = null)