protected override XamarinFormsBootstrapperBase CreateBootstrapper(XamarinFormsBootstrapperBase.IPlatformService platformService, IDataContext context)
        {
            //note force load assembly
            var type = typeof(MugenMvvmToolkit.Xamarin.Forms.Binding.AttachedMembers);

            return(new Bootstrapper <Portable.App>(platformService, new MugenContainer()));
        }
        XamarinFormsBootstrapperBase CreateBootstrapper(
            XamarinFormsBootstrapperBase.IPlatformService platformService, IDataContext context)
        {
            if (platformService == null)
            {
                return(new DesignBootstrapper());
            }

            return(new Bootstrapper(platformService));
        }
        public App(XamarinFormsBootstrapperBase.IPlatformService platformService)
        {
            InitializeComponent();

            var context = DataContext.Empty;

            var bootstrapperBase = XamarinFormsBootstrapperBase.Current;

            if (bootstrapperBase == null)
            {
                bootstrapperBase = CreateBootstrapper(platformService, context);
            }

            bootstrapperBase.InitializationContext = bootstrapperBase.InitializationContext.ToNonReadOnly();
            bootstrapperBase.InitializationContext.AddOrUpdate(ViewModelConstants.StateNotNeeded, true);
            bootstrapperBase.Start();
        }
        protected MvvmXamarinApplicationBase([NotNull] XamarinFormsBootstrapperBase.IPlatformService platformService, IDataContext context = null)
        {
            Should.NotBeNull(platformService, nameof(platformService));

            var bootstrapper = XamarinFormsBootstrapperBase.Current;

            if (bootstrapper == null)
            {
                // ReSharper disable VirtualMemberCallInConstructor
                bootstrapper = CreateBootstrapper(platformService, context ?? DataContext.Empty);
                if (!ShouldRestoreApplicationState())
                {
                    bootstrapper.InitializationContext = bootstrapper.InitializationContext.ToNonReadOnly();
                    bootstrapper.InitializationContext.AddOrUpdate(ViewModelConstants.StateNotNeeded, true);
                }
                // ReSharper restore VirtualMemberCallInConstructor
            }
            bootstrapper.Start();
        }
 protected override XamarinFormsBootstrapperBase CreateBootstrapper(XamarinFormsBootstrapperBase.IPlatformService platformService, IDataContext context)
 {
     return(new Bootstrapper <Portable.App>(platformService, new MugenContainer()));
 }
 public App(XamarinFormsBootstrapperBase.IPlatformService platformService) : base(platformService)
 {
 }
 protected abstract XamarinFormsBootstrapperBase CreateBootstrapper(XamarinFormsBootstrapperBase.IPlatformService platformService, IDataContext context);