diff --git a/WinUIGallery/Controls/PageHeader.xaml b/WinUIGallery/Controls/PageHeader.xaml index 8205084a5..666e08d54 100644 --- a/WinUIGallery/Controls/PageHeader.xaml +++ b/WinUIGallery/Controls/PageHeader.xaml @@ -10,6 +10,7 @@ xmlns:data="using:WinUIGallery.Data" xmlns:local="using:WinUIGallery.DesktopWap.Controls" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + Loaded="UserControl_Loaded" mc:Ignorable="d"> @@ -17,31 +18,81 @@ x:Name="collectionConverter" EmptyValue="Collapsed" NotEmptyValue="Visible" /> + - - - - - + + + + + - + @@ -78,19 +131,19 @@ - + - - + + - + @@ -98,65 +151,72 @@ - - - - - - + - - - - + - + diff --git a/WinUIGallery/Controls/PageHeader.xaml.cs b/WinUIGallery/Controls/PageHeader.xaml.cs index 9543a56e0..b1d4478e2 100644 --- a/WinUIGallery/Controls/PageHeader.xaml.cs +++ b/WinUIGallery/Controls/PageHeader.xaml.cs @@ -91,5 +91,13 @@ public async void OnFeedBackButtonClick(object sender, RoutedEventArgs e) { await Windows.System.Launcher.LaunchUriAsync(new Uri("https://github.com/microsoft/WinUI-Gallery/issues/new/choose")); } + + private void UserControl_Loaded(object sender, RoutedEventArgs e) + { + if (Item == null || (string.IsNullOrEmpty(Item.ApiNamespace) && Item.BaseClasses == null)) + { + APIDetailsBtn.Visibility = Visibility.Collapsed; + } + } } } diff --git a/WinUIGallery/ItemPage.xaml b/WinUIGallery/ItemPage.xaml index f1bfc4f64..c172ab707 100644 --- a/WinUIGallery/ItemPage.xaml +++ b/WinUIGallery/ItemPage.xaml @@ -34,6 +34,32 @@ + + + + + + + + + + + + + @@ -62,64 +88,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -