in this Page we can load all items from json file.
Events
Name |
---|
OnItemClick |
Available Properties
Name |
---|
SpaceBetweenHeaderAndGridView |
HeaderContentMargin |
HeaderCornerRadius |
HeaderVerticalAlignment |
HeaderText |
HeaderFontSize |
HeaderSubtitleText |
HeaderSubtitleFontSize |
UseFullScreenHeaderImage |
HeaderImage |
HeaderOverlayImage |
OverlayOpacity |
Stretch |
NormalizedCenterPoint |
LazyLoadingThreshold |
EnableLazyLoading |
PlaceholderSource |
IsCacheEnabled |
GridViewVerticalAlignment |
GridViewPadding |
JsonNavigationService |
IsTileImage |
Override values
1 | <x:Double x:Key="LandingItemTitleFontSize">14</x:Double> |
Navigation is done automatically, if you want to change something, you can use OnItemClick
event
Normal Usage
1 | <dev:AllLandingPage x:Name="allLandingPage" HeaderImage="ms-appx:///Assets/GalleryHeaderImage.png" |
1 | protected override void OnNavigatedTo(NavigationEventArgs e) |
if you want to navigate to another page:
1 | private void allLandingPage_OnItemClick(object sender, RoutedEventArgs e) |
Load Items from Json File
Create a folder for example DataModel
then add a new json file AppData.json
:DataModel\AppData.json
Set BuildAction to Content, if you are in a Unpackaged Mode, set CopyToOutput to True
To see details and descriptions of Json’s properties, refer to this page
1 | { |
Enable/Disable Items based on Page Exist / IncludedInBuild
you can simply enable/disable items in AppData.json
file just set IncludedInBuild
to true
or false
Localizer
step1:
add "UsexUid": true
for every item in json file which you need to localize it.
step2:
add some resources in your resw files.
for example:
Key | Value |
---|---|
Nav_HomeTitle | Home |
step3:
copy and paste Key in your json file for Title
or subtitle
…
"Title": "Nav_HomeTitle"
everything will be done automatically.