예제 #1
0
        /// <summary>
        /// Updates the index item.
        /// </summary>
        public void UpdateIndexItem()
        {
            _index.SetStyledIndex();
            _index.Clear();
            _items.Clear();

            var indexCount = _childrenList.Count;

            if (indexCount > ItemMaxCount)
            {
                indexCount = ItemMaxCount;
            }
            for (int i = 0; i < indexCount; i++)
            {
                var item = _index.Append(i.ToString());
                _items.Add(item);
            }
            _index.Update(0);
            OnSelect(CurrentPageIndex);
        }
예제 #2
0
        void UpdateIndexItem()
        {
            _index.SetStyledIndex();
            _items.Clear();

            var indexCount = Element.Children.Count;

            if (indexCount > ItemMaxCount)
            {
                indexCount = ItemMaxCount;
            }
            for (int i = 0; i < indexCount; i++)
            {
                var item = _index.Append(i.ToString());
                if (DeviceInfo.Idiom == DeviceIdiom.Watch)
                {
                    item.SetIndexItemStyle(indexCount, i, EvenMiddleItem, OddMiddleItem);
                }
                _items.Add(item);
            }
            _index.Update(0);
            OnSelect(_pageIndex);
        }