Skip to content

Commit d85b966

Browse files
committed
Cleanup code
1 parent d39b4b4 commit d85b966

4 files changed

Lines changed: 13 additions & 22 deletions

File tree

AuraClick/AuraClick.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<RootNamespace>AuraClick</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;ARM64</Platforms>
9-
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10-
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
9+
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</RuntimeIdentifier>
10+
<PublishProfile Condition="Exists('Properties\PublishProfiles\win-$(Platform).pubxml')">win-$(Platform).pubxml</PublishProfile>
1111
<UseWinUI>true</UseWinUI>
1212
<WinUISDKReferences>false</WinUISDKReferences>
1313
<EnableMsixTooling>true</EnableMsixTooling>
14-
<Nullable>enable</Nullable>
1514
<ImplicitUsings>enable</ImplicitUsings>
15+
<Nullable>enable</Nullable>
1616
<DefineConstants>DISABLE_XAML_GENERATED_MAIN</DefineConstants>
1717
<Copyright>Copyright © 2026 Ryan Luu</Copyright>
1818
<ApplicationIcon>Assets\AppIcon.ico</ApplicationIcon>

AuraClick/MainWindow.xaml.cs

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
using AuraClick.Helpers;
1919
using Microsoft.UI.Xaml.Navigation;
20-
using WinUIEx;
2120
using TitleBar = Microsoft.UI.Xaml.Controls.TitleBar;
2221

2322
// To learn more about WinUI, the WinUI project structure,
@@ -26,31 +25,26 @@
2625
namespace 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);

AuraClick/Pages/MainPage.xaml.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
namespace AuraClick;
3030

3131
/// <summary>
32-
/// The main page containing all controls displayed on the main window.
32+
/// The main content page displayed inside the application window.
33+
/// Add your UI logic, event handlers, and data binding here.
3334
/// </summary>
34-
public sealed partial class MainPage
35+
public sealed partial class MainPage : Page
3536
{
3637
/// <summary>
3738
/// The settings page instance.

AuraClick/Pages/SettingsPage.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using AuraClick.Helpers;
1919
using Microsoft.UI.Composition.SystemBackdrops;
2020
using Microsoft.UI.Xaml;
21+
using Microsoft.UI.Xaml.Controls;
2122
using Microsoft.UI.Xaml.Media;
2223
using Windows.ApplicationModel;
2324
using Windows.Storage;
@@ -32,7 +33,7 @@ namespace AuraClick;
3233
/// <summary>
3334
/// Represents the settings page.
3435
/// </summary>
35-
public sealed partial class SettingsPage
36+
public sealed partial class SettingsPage : Page
3637
{
3738
/// <summary>
3839
/// Application settings container in the local app data store.

0 commit comments

Comments
 (0)