Skip to content
Open
Show file tree
Hide file tree
Changes from 9 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,29 @@
"Description": "Design guidance and resources",
"Items":
[
{
"UniqueId": "Geometry",
"Title": "Geometry",
"Subtitle": "Corner radius and geometry values",
"ImagePath": "ms-appx:///Assets/ControlIcons/DefaultIcon.png",
"ImageIconPath": "ms-appx:///Assets/ControlIcons/DefaultIcon.png",
"Description": "",
"Content": "",
"IncludedInBuild": true,
"IsNew": false,
"IsUpdated": false,
"Docs": [
{
"Title": "Geometry in Windows 11",
"Uri": "https://learn.microsoft.com/windows/apps/design/signature-experiences/geometry"
},
{
"Title": "WinUI Theme Resources (GitHub)",
"Uri": "https://github.com/microsoft/microsoft-ui-xaml/blob/main/src/controls/dev/CommonStyles/Common_themeresources_any.xaml"
}
],
"RelatedControls": []
},
{
"UniqueId": "Typography",
"Title": "Typography",
Expand Down Expand Up @@ -68,4 +91,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@
<ui:FontIcon Glyph="&#xEB3C;" />
</ui:NavigationViewItem.Icon>
<ui:NavigationViewItem.MenuItems>
<ui:NavigationViewItem
x:Name="GeometryItem"
Content="Geometry"
Tag="Geometry">
<ui:NavigationViewItem.Icon>
<ui:FontIcon Glyph="&#xE743;" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem
x:Name="TypographyItem"
Content="Typography"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,19 +293,33 @@ private void OnNavigationViewSelectionChanged(NavigationView sender, NavigationV
_lastItem = item;
rootFrame.Navigate(item);
}
else if (selectedItem?.Tag?.ToString() == "Geometry")
{
var geometryId = "Geometry";
if (_lastItem?.ToString() == geometryId) return;
_lastItem = geometryId;
var geometryItem = ControlInfoDataSource.Instance.Realms
.SelectMany(r => r.Groups)
.SelectMany(g => g.Items)
.FirstOrDefault(i => i.UniqueId == "Geometry");
if (geometryItem != null)
{
rootFrame.Navigate(ItemPage.Create(geometryItem));
}
}
else if (selectedItem?.Tag?.ToString() == "Typography")
{
// Handle Typography navigation
var typographyId = "Typography";
if (_lastItem?.ToString() == typographyId) return;
_lastItem = typographyId;

// Find Typography item from the data source
var typographyItem = ControlInfoDataSource.Instance.Realms
.SelectMany(r => r.Groups)
.SelectMany(g => g.Items)
.FirstOrDefault(i => i.UniqueId == "Typography");

if (typographyItem != null)
{
rootFrame.Navigate(ItemPage.Create(typographyItem));
Expand Down
Loading
Loading