Esempio n. 1
0
        public App()
        {
            InitializeComponent();

            //MainPage = new NavigationPage(new Page1());
            ////{
            //    BarBackgroundColor = Color.FromHex("#000000")
            //};
            //MainPage = new NavigationPage(new AddNewItem());
            //MainPage = new Authentification.MainPage();
            //MainPage = new NavigationPage( new Page1());
            //MainPage = new NavigationPage(new AddView());


            //MainPage = new ProjectMvvm.MainPage();

            var model = DependencyInject <AddNewItem> .Get();

            model.CurrentPage = DependencyInject <AddView> .Get();

            model.CurrentPage.BindingContext = model;

            var nav = new NavigationPage(model.CurrentPage);

            model._nav = nav.Navigation;

            MainPage = nav;
        }
Esempio n. 2
0
        public App()
        {
            InitializeComponent();

            //MainPage = new EmpManagement.MainPage();



            var model = DependencyInject <LoginViewModel> .Get();

            model.CurrentPage = DependencyInject <LoginView> .Get();

            model.CurrentPage.BindingContext = model;

            var nav = new NavigationPage(model.CurrentPage);

            model._nav = nav.Navigation;

            MainPage = nav;



            //var model = DependencyInject<UpdateViewModel>.Get();

            //model.CurrentPage = DependencyInject<DetailView>.Get();

            //model.CurrentPage.BindingContext = model;

            //var nav = new NavigationPage(model.CurrentPage);

            //model._nav = nav.Navigation;

            //MainPage = nav;
        }
Esempio n. 3
0
        public App()
        {
            InitializeComponent();

            var model = DependencyInject <ProductViewModel> .Get();

            model.CurrentPage = DependencyInject <MainPage> .Get();

            model.CurrentPage.BindingContext = model;
            var nav = new NavigationPage(model.CurrentPage);

            model._nav = nav.Navigation;
            MainPage   = nav;
        }
        public App()
        {
            InitializeComponent();

            //MainPage = new NaveApproche.MainPage();
            //appeller le viewmodel de la page (1)
            var model = DependencyInject <Page1ViewModel> .Get();

            //appeller contentpage (UI) (2)
            model.CurrentPage = DependencyInject <Page1> .Get();

            //affecter la laison entre les deux (3)
            model.CurrentPage.BindingContext = model;  //(3)

            //étape de navigation
            var nav = new NavigationPage(model.CurrentPage);

            model._nav = nav.Navigation;
            MainPage   = nav;
        }
Esempio n. 5
0
        public App()
        {
            InitializeComponent();



            // step 1:call the viewModel of the page
            var model = DependencyInject <AuthentificationViewModel> .Get();

            // step 2: call the contentPage
            model.CurrentPage = DependencyInject <Views.AuthentificationViewPage> .Get();

            // step 3: do the relation between the View and the viewModel
            model.CurrentPage.BindingContext = model;  //(3)

            //étape de navigation
            var nav = new NavigationPage(model.CurrentPage);

            model._nav = nav.Navigation;
            MainPage   = nav;
        }
Esempio n. 6
0
        public App()
        {
            InitializeComponent();

            MainPage = new BaseVM1.MainPage();
            #region Intial page mvvm
            var vm = DependencyInject <LoginViewModel> .Get();

            vm.CurrentPage = DependencyInject <LoginView> .Get();

            vm.CurrentPage.BindingContext = vm;
            var nav = new NavigationPage(vm.CurrentPage);
            vm._nav  = nav.Navigation;
            MainPage = nav;
            #endregion
            //#region Intial page mvvm
            //var vm = DependencyInject<EmployeesViewModel>.Get();
            //vm.CurrentPage = DependencyInject<EmployeesView>.Get();
            //vm.CurrentPage.BindingContext = vm;
            //var nav = new NavigationPage(vm.CurrentPage);
            //vm._nav = nav.Navigation;
            //MainPage = nav;
            //#endregion
        }
Esempio n. 7
0
        public App()
        {
            InitializeComponent();

            //MainPage = new NavigationPage(new Page1());
            ////{
            //    BarBackgroundColor = Color.FromHex("#000000")
            //};
            //MainPage = new NavigationPage(new AddNewItem());
            //MainPage = new Authentification.MainPage();
            //MainPage = new NavigationPage(new EmpManagement());
            //MainPage = new NavigationPage(new LoginViewModel());



            //var model = DependencyInject<AddNewItem>.Get();

            //model.CurrentPage = DependencyInject<AddView>.Get();

            //model.CurrentPage.BindingContext = model;

            //var nav = new NavigationPage(model.CurrentPage);

            //model._nav = nav.Navigation;

            //MainPage = nav;



            //var model = DependencyInject<UpadateItemViewModel>.Get();

            //model.CurrentPage = DependencyInject<EditView>.Get();

            //model.CurrentPage.BindingContext = model;

            //var nav = new NavigationPage(model.CurrentPage);

            //model._nav = nav.Navigation;

            //MainPage = nav;


            //var model = DependencyInject<RemoveItemView>.Get();

            //model.CurrentPage = DependencyInject<EditView>.Get();

            //model.CurrentPage.BindingContext = model;

            //var nav = new NavigationPage(model.CurrentPage);

            //model._nav = nav.Navigation;

            //MainPage = nav;


            var model = DependencyInject <LoginViewModel> .Get();

            model.CurrentPage = DependencyInject <MainPage> .Get();

            model.CurrentPage.BindingContext = model;

            var nav = new NavigationPage(model.CurrentPage);

            model._nav = nav.Navigation;

            MainPage = nav;
        }