Пример #1
0
        /// <summary>
        ///
        /// 创建元素
        /// </summary>
        /// <param name="target"></param>
        /// <param name="index"></param>
        /// <returns></returns>
        private PageItem _createBlock(PageItem target, int index)
        {
            var block = new PageItem(target);

            block.SetSize(_width, _height);
            block.SetX((index + 1) + _width).Index = index + 2;
            _addBlock(block);
            block.Update();
            return(block);
        }
Пример #2
0
        private void _loadBlock()
        {
            if (_removeEmpty())
            {
                return;
            }
            if (!MainBlock.HasOverflowContent)
            {
                return;
            }

            if (_blocks.Count < 1)
            {
                var block = new PageItem(MainBlock);
                block.SetSize(_width, _height);
                block.SetX(_width).Index = 1;
                _addBlock(block);
            }
            _addLast();
        }