1717
1818using AuraClick . Helpers ;
1919using Microsoft . UI . Xaml . Navigation ;
20- using WinUIEx ;
2120using TitleBar = Microsoft . UI . Xaml . Controls . TitleBar ;
2221
2322// To learn more about WinUI, the WinUI project structure,
2625namespace AuraClick ;
2726
2827/// <summary>
29- /// An window that displays a page's contents.
28+ /// The application window. This hosts a Frame that displays pages. Add your
29+ /// UI and logic to MainPage.xaml / MainPage.xaml.cs instead of here so you
30+ /// can use Page features such as navigation events and the Loaded lifecycle.
3031/// </summary>
31- public sealed partial class MainWindow
32+ public sealed partial class MainWindow : WinUIEx . WindowEx
3233{
33- /// <summary>
34- /// Initializes a new instance of the <see cref="MainWindow" /> class.
35- /// </summary>
3634 public MainWindow ( )
3735 {
3836 InitializeComponent ( ) ;
3937
4038 ExtendsContentIntoTitleBar = true ;
4139 SetTitleBar ( AppTitleBar ) ;
4240
41+ Title = "AppDisplayName" . GetLocalized ( ) ;
4342 AppWindow . SetIcon ( "Assets/AppIcon.ico" ) ;
4443
4544 // Navigate the root frame to the main page on startup.
4645 RootFrame . Navigate ( typeof ( MainPage ) ) ;
4746 }
4847
49- /// <summary>
50- /// Handles the BackRequested event of the AppTitleBar control.
51- /// </summary>
52- /// <param name="sender">The source of the event.</param>
53- /// <param name="args">The event data.</param>
5448 private void AppTitleBar_BackRequested ( TitleBar sender , object args )
5549 {
5650 if ( RootFrame . CanGoBack )
@@ -59,11 +53,6 @@ private void AppTitleBar_BackRequested(TitleBar sender, object args)
5953 }
6054 }
6155
62- /// <summary>
63- /// Handles the Navigated event of the RootFrame control.
64- /// </summary>
65- /// <param name="sender">The source of the event.</param>
66- /// <param name="e">The event data.</param>
6756 private void RootFrame_Navigated ( object sender , NavigationEventArgs e )
6857 {
6958 AppTitleBar . IsBackButtonVisible = e . SourcePageType != typeof ( MainPage ) ;
0 commit comments