Example #1
0
        public void UpdateTabIcons()
        {
            EmptyState.Visibility = BindingConverters.BoolToVisibility(ViewModel.FeedTabEntries.Count == 0);

            if (ViewModel.FeedTabEntries.Count <= 1)
            {
                TabStrip.Visibility = ViewStates.Gone;
                return;
            }

            TabStrip.Visibility = ViewStates.Visible;

            if (ViewModel.ContainsAggregate)
            {
                for (int i = 0; i < TabStrip.TabCount; i++)
                {
                    TabStrip.GetTabAt(i).SetIcon(Util.IndexToIconResource(i));
                }
            }
            else
            {
                for (int i = 1; i < TabStrip.TabCount + 1; i++)
                {
                    TabStrip.GetTabAt(i - 1).SetIcon(Util.IndexToIconResource(i));
                }
            }
        }