■ Section 클래스의 Blocks 속성을 사용해 블럭 수를 구하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 |
using System.Windows.Documents; Section section = new Section(); section.Blocks.Add(new Paragraph(new Run("A bit of text content..."))); Paragraph paragraph = new Paragraph(new Run("Text to insert...")); section.Blocks.InsertBefore(section.Blocks.FirstBlock, paragraph); int blockCount = section.Blocks.Count; |