Пример #1
0
 public void OnShowMenu()
 {
     var existing = _data.FirstOrDefault(vc => vc.Content is MenuItems);
     if (existing == null)
     {
         var newmenu = _objectProvider.Get<MenuItems>();
         var newItem = new ViewContainer("Menu", newmenu);
         _data.Add(newItem);
         Selected = newItem;
     }
     else
     {
         Selected = existing;
     }
 }
Пример #2
0
        public void ShowMenu()
        {
            var existing = Views.FirstOrDefault(vc => vc.Content is MenuItems);

            if (existing == null)
            {
                var newmenu = _objectProvider.Get <MenuItems>();
                var newItem = new ViewContainer("Menu", newmenu);
                Views.Add(newItem);
                Selected = newItem;
            }
            else
            {
                Selected = existing;
            }
        }