diff --git a/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml b/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml
index 22362fa5f5..b58df71ba2 100644
--- a/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml
+++ b/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml
@@ -6,106 +6,71 @@
MinWidth="430"
MinHeight="475"
Title="About Avalonia"
- Background="Purple"
FontFamily="/Assets/Roboto-Light.ttf#Roboto"
x:Class="Avalonia.Dialogs.AboutAvaloniaDialog"
x:DataType="dialogs:AboutAvaloniaDialog">
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs b/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs
index 2dc377a242..ba432337dc 100644
--- a/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs
+++ b/src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs
@@ -3,6 +3,7 @@ using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using Avalonia.Controls;
+using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
namespace Avalonia.Dialogs
@@ -11,35 +12,19 @@ namespace Avalonia.Dialogs
{
private static readonly Version s_version = typeof(AboutAvaloniaDialog).Assembly.GetName().Version;
- public static string Version { get; } = s_version.ToString(2);
+ public static string Version { get; } = $@"v{s_version.ToString(2)}";
public static bool IsDevelopmentBuild { get; } = s_version.Revision == 999;
+ public static string Copyright { get; } = $"© {DateTime.Now.Year} The Avalonia Project";
+
public AboutAvaloniaDialog()
{
AvaloniaXamlLoader.Load(this);
DataContext = this;
}
- public static void OpenBrowser(string url)
- {
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
- {
- // If no associated application/json MimeType is found xdg-open opens retrun error
- // but it tries to open it anyway using the console editor (nano, vim, other..)
- ShellExec($"xdg-open {url}", waitForExit: false);
- }
- else
- {
- using Process process = Process.Start(new ProcessStartInfo
- {
- FileName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? url : "open",
- Arguments = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? $"{url}" : "",
- CreateNoWindow = true,
- UseShellExecute = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
- });
- }
- }
+
private static void ShellExec(string cmd, bool waitForExit = true)
{
@@ -64,5 +49,26 @@ namespace Avalonia.Dialogs
}
}
}
+
+ private void Button_OnClick(object sender, RoutedEventArgs e)
+ {
+ var url = "https://www.avaloniaui.net/";
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ // If no associated application/json MimeType is found xdg-open opens retrun error
+ // but it tries to open it anyway using the console editor (nano, vim, other..)
+ ShellExec($"xdg-open {url}", waitForExit: false);
+ }
+ else
+ {
+ using Process process = Process.Start(new ProcessStartInfo
+ {
+ FileName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? url : "open",
+ Arguments = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? $"{url}" : "",
+ CreateNoWindow = true,
+ UseShellExecute = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
+ });
+ }
+ }
}
}