示例#1
0
        /// <summary>
        /// Removes all the Pivot Items from the Children collection
        /// </summary>
        void ClearItemsSource()
        {
            if ((_pivotItems == null) || (_pivotItems.Count == 0))
            {
                return;
            }

            _headerPanel?.ClearHeader();

            if (_rootGrid != null)
            {
                foreach (var item in _pivotItems)
                {
                    _rootGrid.Children.Remove(item.PivotContent);
                }
            }

            _pivotItems.Clear();
        }
示例#2
0
        /// <summary>
        /// Removes all the Pivot Items from the Children collection
        /// </summary>
        void ClearItemsSource()
        {
            if ((pivotItems == null) || (pivotItems.Count == 0))
            {
                return;
            }

            if (headerPanel != null)
            {
                headerPanel.ClearHeader();
            }

            if (rootGrid != null)
            {
                foreach (PivotItem item in pivotItems)
                {
                    rootGrid.Children.Remove(item.PivotContent);
                }
            }

            pivotItems.Clear();
        }