Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pickup version from Package to use in Settings and GettingStartedPage #196

Merged
merged 3 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 3 additions & 0 deletions CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
// See the LICENSE file in the project root for more information.

using CommunityToolkit.Tooling.SampleGen.Metadata;
using Windows.ApplicationModel;

namespace CommunityToolkit.App.Shared.Pages;

Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
public sealed partial class GettingStartedPage : Page
{
public string AppVersion => $"Version {Package.Current.Id.Version.Major}.{Package.Current.Id.Version.Minor}";

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
3 changes: 2 additions & 1 deletion ProjectHeads/AllComponents/WinAppSdk/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="CommunityToolkit Sample App"
DisplayName="Windows Community Toolkit Gallery"
Square150x150Logo="Assets\MedTile.png"
Square44x44Logo="Assets\AppList.png"
Description="CommunityToolkit Samples"
Expand All @@ -50,5 +50,6 @@
<Capabilities>
<rescap:Capability Name="runFullTrust" />
<Capability Name="internetClient" />
<DeviceCapability Name="webcam"/>
</Capabilities>
</Package>
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
Loading