Ejemplo n.º 1
0
        public async void OnGotFocus()
        {
            if (firstFocus)
            {
                App app = Application.Current as App;
                app.Model = await app.Load();

                SharedModel model = (Application.Current as App).Model;
                foreach (UserCortanaCommand command in model.UserCortanaCommands)
                {
                    UserCortanaCommands.Add(command);
                }
            }
            firstFocus = false;
        }
Ejemplo n.º 2
0
        public MasterViewModel(MasterPage page)
        {
            ViewPage = page;
            //UserCortanaCommand test = new UserCortanaCommand("test");
            //UserCortanaCommands.Add(test);

            if (!firstFocus)
            {
                SharedModel model = (Application.Current as App).Model;
                foreach (UserCortanaCommand command in model.UserCortanaCommands)
                {
                    UserCortanaCommands.Add(command);
                }
            }
        }