IsEndOfCell
Paragraph.IsEndOfCell property
صحيح إذا كانت هذه الفقرة هي الفقرة الأخيرة فيCell
؛ وإلا فسيكون خاطئًا.
public bool IsEndOfCell { get; }
أمثلة
يوضح كيفية إعداد جدول للبقاء معًا على نفس الصفحة.
Document doc = new Document(MyDir + "Table spanning two pages.docx");
Table table = doc.FirstSection.Body.Tables[0];
// تمكين KeepWithNext لكل فقرة في الجدول باستثناء
// آخر العناصر الموجودة في الصف الأخير ستمنع الجدول من الانقسام عبر صفحات متعددة.
foreach (Cell cell in table.GetChildNodes(NodeType.Cell, true))
foreach (Paragraph para in cell.Paragraphs)
{
Assert.True(para.IsInCell);
if (!(cell.ParentRow.IsLastRow && para.IsEndOfCell))
para.ParagraphFormat.KeepWithNext = true;
}
doc.Save(ArtifactsDir + "Table.KeepTableTogether.docx");
أنظر أيضا
- class Paragraph
- مساحة الاسم Aspose.Words
- المجسم Aspose.Words