Skip to content

Commit cab8704

Browse files
Pickup version from Package to use in Settings and GettingStartedPage
Update PolySharp to 1.14.1 TODO: Didn't check if this works in WASDK?
1 parent bc976cb commit cab8704

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
1+
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
22
<Page x:Class="CommunityToolkit.App.Shared.Pages.GettingStartedPage"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -72,7 +72,7 @@
7272
Orientation="Vertical"
7373
Spacing="4">
7474
<TextBlock FontWeight="SemiBold"
75-
Text="Version 8.0" />
75+
Text="{x:Bind AppVersion}" />
7676
<TextBlock FontSize="36"
7777
FontWeight="SemiBold">
7878
<Run Text="Windows Community Toolkit" />

CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ namespace CommunityToolkit.App.Shared.Pages;
88

99
public sealed partial class GettingStartedPage : Page
1010
{
11+
public string AppVersion => $"Version {Package.Current.Id.Version.Major}.{Package.Current.Id.Version.Minor}";
12+
1113
public GettingStartedPage()
1214
{
1315
this.InitializeComponent();

CommunityToolkit.App.Shared/Pages/SettingsPage.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
7474
Text="About" />
7575

76-
<controls:SettingsExpander Description="© 2023. All rights reserved."
76+
<controls:SettingsExpander Description="© 2024. All rights reserved."
7777
Header="Windows Community Toolkit Gallery"
7878
IsExpanded="True">
7979
<controls:SettingsExpander.HeaderIcon>
@@ -82,7 +82,7 @@
8282
</controls:SettingsExpander.HeaderIcon>
8383
<TextBlock win:IsTextSelectionEnabled="True"
8484
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
85-
Text="Version 8.0.0" />
85+
Text="{x:Bind AppVersion}" />
8686
<controls:SettingsExpander.Items>
8787
<controls:SettingsCard HorizontalContentAlignment="Left"
8888
ContentAlignment="Left">

CommunityToolkit.App.Shared/Pages/SettingsPage.xaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using Windows.ApplicationModel;
6+
57
namespace CommunityToolkit.App.Shared.Pages
68
{
79
/// <summary>
810
/// An empty page that can be used on its own or navigated to within a Frame.
911
/// </summary>
1012
public sealed partial class SettingsPage : Page
1113
{
14+
public string AppVersion => $"Version {Package.Current.Id.Version.Major}.{Package.Current.Id.Version.Minor}.{Package.Current.Id.Version.Build}";
15+
1216
public SettingsPage()
1317
{
1418
this.InitializeComponent();

ProjectHeads/Head.Uwp.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128

129129
<ItemGroup>
130130
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.14"/>
131-
<PackageReference Include="PolySharp" Version="1.13.1">
131+
<PackageReference Include="PolySharp" Version="1.14.1">
132132
<PrivateAssets>all</PrivateAssets>
133133
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
134134
</PackageReference>

0 commit comments

Comments
 (0)