예제 #1
0
 public void UpdateSelectedNavBarButton(string pageTypeFullName)
 {
     InvokeOnUIThread(() =>
     {
         if (pageTypeFullName != null)
         {
             TopSelectedNavBarItem    = TopNavBarItems.FirstOrDefault(x => x.PageName == pageTypeFullName);
             BottomSelectedNavBarItem = BottomNavBarItems.FirstOrDefault(x => x.PageName == pageTypeFullName);
         }
         else
         {
             TopSelectedNavBarItem = BottomSelectedNavBarItem = null;
         }
     });
 }
예제 #2
0
        public void UpdateDefaultPageIcon(string pageTypeFullName)
        {
            var descriptor = PageUtil.GetDescriptorFromTypeFullName(pageTypeFullName);

            InvokeOnUIThread(() =>
            {
                if (TopNavBarItems[1].PageName != typeof(TilePage).FullName)
                {
                    TopNavBarItems.RemoveAt(1);
                }

                if (!string.IsNullOrEmpty(descriptor?.Category))
                {
                    TopNavBarItems.Insert(1, new NavBarDataItem
                    {
                        Content  = descriptor.Title,
                        Icon     = descriptor.Tag,
                        PageName = descriptor.Type.FullName
                    });
                }
            });
        }