in this page we can load only items that is tagged as IsNew, IsUpdated and IsPreview.
We moved all namespaces into a single namespace. No matter which (WinUICommunity) library you use, the namespace is always as follows
For use in the Xaml:xmlns:wuc="using:WinUICommunity"
For use in the Csharp:using WinUICommunity;
Events
Name |
---|
OnItemClick |
Available Properties
Name |
---|
HeaderText |
HeaderSubtitleText |
HeaderContent |
HeaderImage |
HeaderImageHeight |
HeaderMargin |
FooterContent |
FooterHeight |
FooterMargin |
HeaderFontSize |
HeaderSubtitleFontSize |
Override values
1 | <x:Double x:Key="LandingItemTitleFontSize">14</x:Double> |
Simple Use
first add:
1 | xmlns:wuc="using:WinUICommunity" |
then use MainLandingPage:
1 | <wuc:MainLandingPage x:Name="mainLandingPage" Loaded="mainLandingPage_Loaded" |
Load Items from Json File
if you want to load items to a gridview, you need to 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 | { |
now you need to load items:
if you are using JsonNavigationViewService
:
1 | protected override void OnNavigatedTo(NavigationEventArgs e) |
if not:
1 | protected override void OnNavigatedTo(NavigationEventArgs e) |
if you want to navigate to another page:
1 | private void mainLandingPage_OnItemClick(object sender, RoutedEventArgs e) |
Enable/Disable Items based on Page Exist
if you want to control items enable/disable, you can do this in 2 way (default is autoIncludedInBuild = false
):
AutoIncludedInBuild
we will check if page exist or not.
IncludedInBuild
you can simply enable/disable items in AppData.json
file just set IncludedInBuild
to true
or false