コード例 #1
0
        /// <summary>
        /// When the layout updates, move any overflow to the next page and ensure the border still exists
        /// </summary>
        protected void OnReflow()
        {
            //Ensure the border still exists
            if (IndexOfChild(Border) < 0)
            {
                AddChild(Border);
                Border.MoveToBack();
            }

            //Move any overflow to the next page
            if (Overflow != null)
            {
                //Create a new page if required
                if (Next == null)
                {
                    Next = new Page((int)X, (int)(Y + Height + 10), ' ', Document, this, null);
                    Document.AddChild(Next);
                }

                //Move the overflow to the next page
                Next.AddRtfAt(Overflow.Rtf, 0);
                ClearOverflow();
            }
        }