MvvmCross 6.0 UWP依赖性

时间:2018-11-04 19:20:01

标签: xamarin.forms uwp mvvmcross

本教程https://www.mvvmcross.com/documentation/platform/uwp/universal-windows-platform-uwp?scroll=621试图使我依赖UWP

但在Setup.cs的此步骤中:  public Setup( Frame rootFrame ) : base( rootFrame ){}

我收到错误消息enter image description here

有人知道为什么吗?

对Android的依赖效果很好

1 个答案:

答案 0 :(得分:0)

解决方案

App.xaml.cs

public partial class App
{
    public App()
    {
        InitializeComponent();
    }
}
public abstract class AWSService : MvxApplication<Setup, Core.App>
{ }

Setup.cs

public class Setup : MvxWindowsSetup<Core.App>
{
    public Setup()
    { }

    protected override IMvxApplication CreateApp()
    {
        Mvx.IoCProvider.RegisterType<IYourInterface, YourNativeClass>();
        return new Core.App();
    }
}