Skip to content

Commit 0ebb625

Browse files
Add version to window title
1 parent eb89a80 commit 0ebb625

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Src/HandyDandy/ViewModels/MainWindowViewModel.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System;
1313
using System.Diagnostics;
1414
using System.Linq;
15+
using System.Reflection;
1516

1617
namespace HandyDandy.ViewModels
1718
{
@@ -48,6 +49,15 @@ public void Fill()
4849
}
4950
}
5051

52+
public static string Title
53+
{
54+
get
55+
{
56+
Version? ver = Assembly.GetExecutingAssembly().GetName().Version;
57+
return $"Handy Dandy {ver?.ToString(4)} {(ver?.Major == 0 ? "(beta)" : "")}";
58+
}
59+
}
60+
5161
public InputType[] InputTypeList { get; }
5262

5363
private InputType _selIn;

Src/HandyDandy/Views/MainWindow.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Height="780"
1010
Width="780"
1111
CanResize="False"
12-
Title="Handy-Dandy">
12+
Title="{Binding Title}">
1313

1414
<Design.DataContext>
1515
<vm:MainWindowViewModel/>

0 commit comments

Comments
 (0)