这个
MvvmCross Forms UWP Playground Project
帮助很大,对任何基本面都很好。以下是其他人想要的解决方案:
<local:MyApp
x:Class="MyApp.UWP.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyApp.Forms.UWP"
RequestedTheme="Light">
</local:MyApp>
在App.xaml.cs中:
sealed partial class App
{
public App()
{
InitializeComponent();
}
}
public abstract class MyApp : MvxWindowsApplication<MvxFormsWindowsSetup<Core.App, Forms.App>, Core.App, Forms.App, MainPage>
{
}
<mvxf:MvxFormsWindowsPage
xmlns:mvxf="using:MvvmCross.Forms.Platforms.Uap.Views"
x:Class="MyApp.Forms.UWP.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyApp.Forms.UWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
</Grid>
</mvxf:MvxFormsWindowsPage>
主页.xaml.cs
public sealed partial class MainPage
{
public MainPage()
{
this.InitializeComponent();
}
}