protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // setup the application Setup.Instance.EnsureInitialized(ApplicationContext); Mvx.Resolve<ITopActivity>().Activity = this; _bindingContext = new MvxBindingContext(this, new LayoutInflaterProvider(LayoutInflater), new FooBarViewModel()); var view = _bindingContext.BindingInflate(Resource.Layout.Main, null); SetContentView(view); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // setup the application Setup.Instance.EnsureInitialized(ApplicationContext); Mvx.Resolve<ITopActivity>().Activity = this; // ensure location plugin is available Cirrious.MvvmCross.Plugins.Location.PluginLoader.Instance.EnsureLoaded(); // create the view model var viewModel = Mvx.IocConstruct<LocationViewModel>(); // create the databound UI _bindingContext = new MvxBindingContext(this, new LayoutInflaterProvider(LayoutInflater), viewModel); var view = _bindingContext.BindingInflate(Resource.Layout.Main, null); SetContentView(view); }
public DynamicContext() { BindingContext = new MvxBindingContext(); }