use PRISM6 to build a Windows 10 generic program.
Objective: To establish a Windows Generic program project using PRISM6.
1. Solution-Add new project-general-blank app-Enter name-OK-OK
2, reference on right--Select Manage NuGet Package--point browse-Enter prism.unity Find-install-ok install
3, open App.xaml change application to Prismunityapplication.
4. Open the App.xaml.cs code file
Delete 32 rows. This. Suspending + = onsuspending;
Delete 35~104 lines
Add: Using Prism.Unity.Windows; Using System.Threading.Tasks;
Change application to Prismunityapplication
To add a method:
protected override Task Onlaunchapplicationasync (Launchactivatedeventargs args)
{
Navigationservice.navigate ("Home", null);
return task.fromresult<object> (NULL);
}
5, create the Views directory, inside Add a blank page "home page" (Note that there will be page several words, the navigation name is not written there)
Add text to the homepage and you can start the program to see the effect.
Summary points:
1, reference prism.unity through NuGet.
2, change the app file inside application is prismunityapplication, foreground and backstage are to change.
3, override the Onlaunchapplicationasync method. This method is required to run the program startup.
Forward to the Universal program ...
Use PRISM6 to build a Windows 10 generic program.