Ejemplo n.º 1
0
        public App()
        {
            Device.SetFlags(new string[] { "StateTriggers_Experimental", "SwipeView_Experimental" });

            // 1. Initial Theme -> LightTheme
            DependencyService.Register <Framework.Xaml.Themes.ThemeSelectorVM>();
            ThemeSelectorVM.Initialize(new Elmah.XamarinForms.Themes.LightTheme(), new Elmah.XamarinForms.Themes.DarkTheme());
            ThemeSelectorVM.SwitchTheme(Framework.Themes.Theme.Light);

            // 2. AppVM Initialize
            DependencyService.Register <Elmah.XamarinForms.ViewModels.AppVM>();
            AppVM.Initialize();

            InitializeComponent();

            MainPage = new Elmah.XamarinForms.AppShell();
        }