diff --git a/Views/Settings.xaml b/Views/Settings.xaml
index 33d6641..b1e9095 100644
--- a/Views/Settings.xaml
+++ b/Views/Settings.xaml
@@ -8,12 +8,21 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
diff --git a/Views/Settings.xaml.cs b/Views/Settings.xaml.cs
index 3bd659e..76933a2 100644
--- a/Views/Settings.xaml.cs
+++ b/Views/Settings.xaml.cs
@@ -1,29 +1,28 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Runtime.InteropServices.WindowsRuntime;
-using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
-using Microsoft.UI.Xaml.Controls.Primitives;
-using Microsoft.UI.Xaml.Data;
-using Microsoft.UI.Xaml.Input;
-using Microsoft.UI.Xaml.Media;
-using Microsoft.UI.Xaml.Navigation;
-using Windows.Foundation;
-using Windows.Foundation.Collections;
-
-// To learn more about WinUI, the WinUI project structure,
-// and more about our project templates, see: http://aka.ms/winui-project-info.
+using Windows.ApplicationModel;
namespace TailscaleClient.Views;
-///
-/// An empty page that can be used on its own or navigated to within a Frame.
-///
+
public sealed partial class Settings : Page
{
+ private readonly string Version;
+
+ public static string GetAppVersion()
+ {
+ try
+ {
+ var version = Package.Current.Id.Version;
+ return string.Format("{0}.{1}.{2}", version.Major, version.Minor, version.Build);
+ }
+ catch
+ {
+ return "Unpackaged build";
+ }
+ }
+
public Settings()
{
this.InitializeComponent();
+ Version = GetAppVersion();
}
}