step2: add `"UsexUid": true` for every item in json file.
step3: add some resources in your resw files. for example:
|Key|Value| |-|-| |Nav_HomeTitle|Home|
step4: copy and paste Key in your json file for `Title` or `subtitle`...
`"Title": "Nav_HomeTitle"`
In the last step, you need to create the json file: create a new `json` file (`AppData.json`) in a folder called `DataModel`:
{% note warning %} - Set BuildAction for `AppData.json` to `Content` andif you are in a Unpackaged app, also set `CopyToOutput` to `Always` {% endnote %}
{% note info %} To see details and descriptions of Json's properties, refer to <ins>**[this](https://ghost1372.github.io/winUICommunity/jsonFile)**</ins> page {% endnote %} {% note warning %} If you have items that use the same Page, you should set the `parameter` property in the json file to avoid navigation errors. "UniqueId": "WinUICommunity.DemoApp.Pages.myPage", "Title": "Movie" "Parameter": "Movie" --- "UniqueId": "WinUICommunity.DemoApp.Pages.myPage", "Title": "Series" "Parameter": "Series" {% endnote %} {% note info %} When we add page information (key, page) in the dictionary, the key is created as follows (parameter can be null) UniqueId + Parameter {% endnote %} this is a json file content: ```json { "Groups": [ { "UniqueId": "Features", "Title": "Features pages", "IsSpecialSection": false, "Items": [ { "UniqueId": "WinUICommunity.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", "ImageIconPath": "ms-appx:///Assets/Modules/PT.png", "Description": "test description", "IsUpdated": true, "IncludedInBuild": true, "Links": [ { "Title": "ApplicationDataContainerPage", "Uri": "https://ghost1372.github.io/WinUICommunity/helpers/applicationDataContainerHelper/" } ], "Extra": [ "AppBarToggleButton", "AppBarSeparator", "CommandBar" ] }, { "UniqueId": "WinUICommunity.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", "ImageIconPath": "ms-appx:///Assets/Modules/PT.png", "IncludedInBuild": true, "Links": [ { "Title": "AppNotificationPage", "Uri": "https://ghost1372.github.io/WinUICommunity/helpers/appNotification/" } ] }, ] }, { "UniqueId": "Settings", "Title": "Settings pages", "SecondaryTitle": "Test SecondaryTitle", "Items": [ { "UniqueId": "WinUICommunity.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", "ImageIconPath": "ms-appx:///Assets/Modules/PT.png", "IsUpdated": true, "IncludedInBuild": true, } ] } ] }
UniqueId this is your pages full address, for example: WinUICommunity.DemoApp.Pages.ApplicationDataContainerPage
ApiNamespace this is your apps namespace, for example: WinUICommunity.DemoApp
for Navigating to a Page we used UniqueId.
Methods and Properties
there is some methods and properties that you can use them:
1 2 3
var jsonDataSource = jsonNavigationViewService.DataSource;