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

Set URI source version numbers dynamically to simplify maintenance #1523

Merged
merged 2 commits into from
Apr 3, 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
2 changes: 1 addition & 1 deletion WinUIGallery/DataModel/ControlInfoData.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
{
"Title": "WinUI Theme Resources (GitHub)",
"Uri": "https://github.com/microsoft/microsoft-ui-xaml/blob/winui3/release/1.5-stable/controls/dev/CommonStyles/Common_themeresources_any.xaml"
"Uri": "https://github.com/microsoft/microsoft-ui-xaml/blob/winui3/release/X.Y-stable/controls/dev/CommonStyles/Common_themeresources_any.xaml"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions WinUIGallery/DataModel/ControlInfoDataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using WinUIGallery.Common;
using WinUIGallery.DesktopWap.DataModel;
using WASDK = Microsoft.WindowsAppSDK;

// The data model defined by this file serves as a representative example of a strongly-typed
// model. The property names chosen coincide with data bindings in the standard item templates.
Expand Down Expand Up @@ -72,7 +72,7 @@ public class ControlInfoDocLink
public ControlInfoDocLink(string title, string uri)
{
this.Title = title;
this.Uri = uri;
this.Uri = uri.Replace("X.Y", string.Format("{0}.{1}", WASDK.Release.Major, WASDK.Release.Minor));
}
public string Title { get; set; }
public string Uri { get; set; }
Expand Down
3 changes: 2 additions & 1 deletion WinUIGallery/ItemPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
using Microsoft.UI.Xaml.Media.Animation;
using Microsoft.UI.Xaml.Navigation;
using WinUIGallery.DesktopWap.Controls;
using WASDK = Microsoft.WindowsAppSDK;

namespace WinUIGallery
{
Expand All @@ -33,7 +34,7 @@ namespace WinUIGallery
/// </summary>
public sealed partial class ItemPage : Page
{
private static string WinUIBaseUrl = "https://github.com/microsoft/microsoft-ui-xaml/tree/winui3/release/1.5-stable/controls/dev/";
private static string WinUIBaseUrl = string.Format("https://github.com/microsoft/microsoft-ui-xaml/tree/winui3/release/{0}.{1}-stable/controls/dev", WASDK.Release.Major, WASDK.Release.Minor);
private static string GalleryBaseUrl = "https://github.com/microsoft/WinUI-Gallery/tree/main/WinUIGallery/ControlPages/";

public ControlInfoDataItem Item
Expand Down