Search code examples
.netmvvmwindows-store-appsmvvmcrosswindows-store

MvvmCross Application Resource Dictionary issue


I am implementing MvvmCross, and I changed the App base class from Application to MvxApplication. However, the resource dictionaries in my app are broken, obviously because MvxApplication doesn't inherit from Application. So how do you define your resources for your application? The documentation isn't really clear, since the setup require this:

public class Setup : MvxStoreSetup
{
    public Setup(Frame rootFrame) 
        : base(rootFrame) { }

    protected override IMvxApplication CreateApp()
    {
          return new App();
    {
}

But app inherits from Application to get those core features like the global resource dictionaries, but it needs an IMvxApplication, which is base class MvxApplication. I know an interface you can implement both, but it doesn't make sense...


Solution

  • The IMvxApplication is completely separate to the winstore App, the Android application or the iOS AppDelegate

    The MvxApplication is the central hub for all of your cross platform ViewModels, Models and Services - it exists separately from all of the platform specific application objects.

    Some of this is explained in the first two N+1 videos - but we are also working on more documents too