예제 #1
0
        public void LoadViewForController(IMXView fromView, IMXController controller, MXViewPerspective viewPerspective)
        {
            hideLoading();

            if (controller.View == null)
            {
                // get the view, create it if it has yet been created
                controller.View = Views.GetOrCreateView(viewPerspective);
                if (controller.View == null)
                {
                    //Console.WriteLine("View not found for perspective!" + viewPerspective.ToString());
                    throw new ArgumentException("View creation failed for perspective!" + viewPerspective.ToString());
                }
            }


            // asign the view it's model and render the contents of the view
            controller.View.SetModel(controller.GetModel());
            controller.View.Render();

            // pull the type from the view
            //ViewNavigationContext navigationContext = MXFormsNavigation.GetViewNavigationContext(controller.View);
            Page page = controller.View as Page;

            // iFactr binding options
            if (page == null)
            {
                page = RenderLayer(controller.View);
            }

            ViewNavigationContext navigationContext = MXFormsNavigation.GetViewNavigationContext(controller.View);

            formsNavigation.PushToModel(page);
        }
예제 #2
0
		public MXFormsContainer (MXApplication app, NavigationPage navigationPage, Action<Task> onInitializationFinished = null) : base (app)
		{
			this.formsNavigation = new MXFormsNavigation(navigationPage);
			this.onInitializationFinished = onInitializationFinished;

			MXContainer.InitializeContainer(this);
			startApplication();
		}
예제 #3
0
        public MXFormsContainer(MXApplication app, NavigationPage navigationPage, Action <Task> onInitializationFinished = null) : base(app)
        {
            this.formsNavigation          = new MXFormsNavigation(navigationPage);
            this.onInitializationFinished = onInitializationFinished;

            MXContainer.InitializeContainer(this);
            startApplication();
        }