Skip to content

Commit

Permalink
Pickup version from Package to use in Settings and GettingStartedPage
Browse files Browse the repository at this point in the history
Update PolySharp to 1.14.1
TODO: Didn't check if this works in WASDK?
  • Loading branch information
michael-hawker committed Jul 1, 2024
1 parent e366657 commit a49b84c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- 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. -->
<!-- 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. -->
<Page x:Class="CommunityToolkit.App.Shared.Pages.GettingStartedPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand Down Expand Up @@ -72,7 +72,7 @@
Orientation="Vertical"
Spacing="4">
<TextBlock FontWeight="SemiBold"
Text="Version 8.0" />
Text="{x:Bind AppVersion}" />
<TextBlock FontSize="36"
FontWeight="SemiBold">
<Run Text="Windows Community Toolkit" />
Expand Down
2 changes: 2 additions & 0 deletions CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace CommunityToolkit.App.Shared.Pages;

public sealed partial class GettingStartedPage : Page
{
public string AppVersion => $"Version {Package.Current.Id.Version.Major}.{Package.Current.Id.Version.Minor}";

Check failure on line 11 in CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml.cs

View workflow job for this annotation

GitHub Actions / new-experiment

The name 'Package' does not exist in the current context

Check failure on line 11 in CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml.cs

View workflow job for this annotation

GitHub Actions / new-experiment

The name 'Package' does not exist in the current context

Check failure on line 11 in CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml.cs

View workflow job for this annotation

GitHub Actions / project-template

The name 'Package' does not exist in the current context

Check failure on line 11 in CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml.cs

View workflow job for this annotation

GitHub Actions / project-template

The name 'Package' does not exist in the current context

public GettingStartedPage()
{
this.InitializeComponent();
Expand Down
4 changes: 2 additions & 2 deletions CommunityToolkit.App.Shared/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
Text="About" />

<controls:SettingsExpander Description="© 2023. All rights reserved."
<controls:SettingsExpander Description="© 2024. All rights reserved."
Header="Windows Community Toolkit Gallery"
IsExpanded="True">
<controls:SettingsExpander.HeaderIcon>
Expand All @@ -82,7 +82,7 @@
</controls:SettingsExpander.HeaderIcon>
<TextBlock win:IsTextSelectionEnabled="True"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Text="Version 8.0.0" />
Text="{x:Bind AppVersion}" />
<controls:SettingsExpander.Items>
<controls:SettingsCard HorizontalContentAlignment="Left"
ContentAlignment="Left">
Expand Down
4 changes: 4 additions & 0 deletions CommunityToolkit.App.Shared/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Windows.ApplicationModel;

namespace CommunityToolkit.App.Shared.Pages
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class SettingsPage : Page
{
public string AppVersion => $"Version {Package.Current.Id.Version.Major}.{Package.Current.Id.Version.Minor}.{Package.Current.Id.Version.Build}";

public SettingsPage()
{
this.InitializeComponent();
Expand Down
2 changes: 1 addition & 1 deletion ProjectHeads/Head.Uwp.props
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.14"/>
<PackageReference Include="PolySharp" Version="1.13.1">
<PackageReference Include="PolySharp" Version="1.14.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit a49b84c

Please sign in to comment.