Skip to content

JSON File Structure.

💡 Schema Support: This JSON structure is supported by an IntelliSense schema available at: https://raw.githubusercontent.com/Ghost1372/DevWinUI/refs/heads/main/tools/AppData.Schema.json

json
{
  "$schema": "https://raw.githubusercontent.com/Ghost1372/DevWinUI/refs/heads/main/tools/AppData.Schema.json",
  ...
}

You can reference this schema in your JSON files for editor support like autocompletion and validation by adding the following line at the top of your JSON file:

BaseDataInfo

Inherited by DataGroup and DataItem

NameTypeRemark
UniqueIdstringThe UniqueId must exactly match the full namespace (including file name) of your .xaml view file (e.g., DevWinUIGallery.Views.HomeLandingPage).
SectionIdstringDefines a page as a section in the gallery. Initialize it using .ConfigureSectionPage(typeof(DemoSectionPage)).Make sure to provide the full namespace of the section page, for example:DevWinUIGallery.Views.DemoSectionPageSee example here
Titlestring
ApiNamespacestring
SecondaryTitlestring
Subtitlestring
Descriptionstring
ImagePathstringDefines the image source shown on both the LandingPage and the NavigationViewItem icon. Example: ms-appx:///Assets/Fluent/Extensions.png
IconGlyphstringSpecifies a glyph (Unicode character) to be used as the icon for the NavigationViewItem, typically via a FontIcon. Example: EA6A Note: If both IconGlyph and ImagePath are defined, the NavigationViewItem will prioritize and use IconGlyph
LocalizeIdstringSpecifies the resource key used for localizing properties such as Title, Subtitle, Description, and SecondaryTitle. Example: Nav_HomeKey Requires UsexUid to be set to true. See example here
IsNavigationViewItemHeaderboolMarks the item as a header within the NavigationView
UsexUidboolEnables localization through x:Uid. Required when using LocalizeId.
DataInfoBadgeDataInfoBadgeAssigns an InfoBadge to the item, allowing visual indicators like status or alerts.
HideNavigationViewItemIconbool

DataInfoBadge

NameTypeRemark
NavigationViewInfoBadgeStylestringSpecifies the style of the InfoBadge in the NavigationView. Example: StringInfoBadgeStyle
LandingPageInfoBadgeStylestringSpecifies the style of the InfoBadge on the LandingPage. Example: AttentionIconInfoBadgeStyle
InfoBadgeValuestringSets the value of the InfoBadge if the style is StringInfoBadgeStyle. Examples: "BETA", "NEW"
IsLandingPageInfoBadgeHiddenboolControls the visibility of the InfoBadge on the LandingPage.
IsNavigationViewInfoBadgeHiddenboolControls the visibility of the InfoBadge in the NavigationView item.

DataGroup (inherits from BaseDataInfo)

NameTypeRemark
DefaultBuiltInNavigationViewInfoBadgeStylestringSets the default style for InfoBadge in the NavigationView. Default: StringInfoBadgeStyle
DefaultBuiltInLandingPageInfoBadgeStylestringSets the default style for InfoBadge on the LandingPage. Default: AttentionIconInfoBadgeStyle
IsExpandedbool
IsSpecialSectionbool
HideGroupboolHides the entire group from the NavigationView
ShowItemsWithoutGroupboolDisplays individual NavigationViewItems that don’t belong to any group as separate entries.
IsFooterNavigationViewItemboolIf true, the item will be placed in the footer section of the NavigationView.
OrderboolWhen enabled, sorts items in ascending order.
OrderByDescendingboolIf true, sorts items in descending order.
UseBuiltInNavigationViewInfoBadgeStyleboolIf enabled, applies the default style defined in DefaultBuiltInNavigationViewInfoBadgeStyle. Automatically displays InfoBadge when IsNew, IsUpdated, or IsPreview are set to true.
UseBuiltInLandingPageInfoBadgeStyleboolIf enabled, applies the default style defined in DefaultBuiltInLandingPageInfoBadgeStyle. Automatically displays InfoBadge when IsNew, IsUpdated, or IsPreview are set to true.
ItemsObservableCollection<DataItem>

DataItem (inherits from BaseDataInfo)

NameTypeRemark
Contentstring
Parameterobject
IsNewbool
IsUpdatedbool
IsPreviewbool
HideItemboolHides the item from the LandingPage.
HideNavigationViewItemboolHides the item from the NavigationView.
IncludedInBuildbool
LinksObservableCollection<DataLink>
ExtraObservableCollection<string>

DataLink

NameTypeRemark
Titlestring
Uristring

Example

json
{
  "$schema": "https://raw.githubusercontent.com/Ghost1372/DevWinUI/refs/heads/main/tools/AppData.Schema.json",
  "Groups": [
    {
      "UniqueId": "Features",
      "Title": "Features pages",
      "IsSpecialSection": false,
      "Items": [
        {
          "UniqueId": "DevWinUI.DemoApp.Pages.ApplicationDataContainerPage",
          "Title": "ApplicationDataContainer",
          "SecondaryTitle": "Test SecondaryTitle",
          "Subtitle": "you can use ApplicationDataContainerHelper for saving and loading application settings.",
          "ImagePath": "ms-appx:///Assets/Modules/PT.png",
          "Description": "test description",
          "IsUpdated": true,
          "Links": [
            {
              "Title": "ApplicationDataContainerPage",
              "Uri": "https://DevWinUI.github.io/DevWinUI/helpers/applicationDataContainerHelper/"
            }
          ],
          "Extra": [
            "AppBarToggleButton",
            "AppBarSeparator",
            "CommandBar"
          ]
        },
        {
          "UniqueId": "DevWinUI.DemoApp.Pages.AppNotificationPage",
          "Title": "App Notification",
          "SecondaryTitle": "Test SecondaryTitle",
          "Subtitle": "you can use AppNotificationPage for Sending Toast Notification.",
          "ImagePath": "ms-appx:///Assets/Modules/PT.png",
          "Links": [
            {
              "Title": "AppNotificationPage",
              "Uri": "https://DevWinUI.github.io/DevWinUI/helpers/appNotification/"
            }
          ]
        },
      ]
    },
    {
      "UniqueId": "Settings",
      "Title": "Settings pages",
      "SecondaryTitle": "Test SecondaryTitle",
      "Items": [
        {
          "UniqueId": "DevWinUI.DemoApp.Pages.OobePage",
          "Title": "Oobe Page",
          "ApiNamespace": "DemoApp",
          "SecondaryTitle": "Test SecondaryTitle",
          "Subtitle": "Settings Page with a Hero Image",
          "ImagePath": "ms-appx:///Assets/Modules/PT.png",
          "IsUpdated": true,
        }
      ]
    }
  ]
}

Demo

you can run demo and see this feature.

Released under the MIT License.