本文整理汇总了C#中System.Windows.Documents.DocumentNode.IsLastParagraphInCell方法的典型用法代码示例。如果您正苦于以下问题:C# DocumentNode.IsLastParagraphInCell方法的具体用法?C# DocumentNode.IsLastParagraphInCell怎么用?C# DocumentNode.IsLastParagraphInCell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Documents.DocumentNode
的用法示例。
在下文中一共展示了DocumentNode.IsLastParagraphInCell方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteParagraph
//.........这里部分代码省略.........
// Margins
_rtfBuilder.Append("\\li");
_rtfBuilder.Append(fsThis.LI.ToString(CultureInfo.InvariantCulture));
_rtfBuilder.Append("\\ri");
_rtfBuilder.Append(fsThis.RI.ToString(CultureInfo.InvariantCulture));
_rtfBuilder.Append("\\sa");
_rtfBuilder.Append(fsThis.SA.ToString(CultureInfo.InvariantCulture));
_rtfBuilder.Append("\\sb");
_rtfBuilder.Append(fsThis.SB.ToString(CultureInfo.InvariantCulture));
// Borders
if (fsThis.HasParaBorder)
{
_rtfBuilder.Append(fsThis.ParaBorder.RTFEncoding);
}
// TextIndent
if (dnThis.ListLabel != null)
{
_rtfBuilder.Append("\\jclisttab\\tx");
_rtfBuilder.Append(fsThis.LI.ToString(CultureInfo.InvariantCulture));
_rtfBuilder.Append("\\fi-360");
}
else
{
_rtfBuilder.Append("\\fi");
_rtfBuilder.Append(fsThis.FI.ToString(CultureInfo.InvariantCulture));
}
// Alignment
switch (fsThis.HAlign)
{
case HAlign.AlignLeft:
if (fsThis.DirPara != DirState.DirRTL)
{
_rtfBuilder.Append("\\ql");
}
else
{
_rtfBuilder.Append("\\qr");
}
break;
case HAlign.AlignRight:
if (fsThis.DirPara != DirState.DirRTL)
{
_rtfBuilder.Append("\\qr");
}
else
{
_rtfBuilder.Append("\\ql");
}
break;
case HAlign.AlignCenter:
_rtfBuilder.Append("\\qc");
break;
case HAlign.AlignJustify:
_rtfBuilder.Append("\\qj");
break;
}
// Background color
if (fsThis.CBPara >= 0)
{
_rtfBuilder.Append("\\cbpat");
_rtfBuilder.Append(fsThis.CBPara.ToString(CultureInfo.InvariantCulture));
}
// LineHeight
if (fsThis.SL != 0)
{
_rtfBuilder.Append("\\sl");
_rtfBuilder.Append(fsThis.SL.ToString(CultureInfo.InvariantCulture));
_rtfBuilder.Append("\\slmult0");
}
// omit \par if last paragraph in cell
if (dnThis.IsLastParagraphInCell())
{
DocumentNode dnCell = dnThis.GetParentOfType(DocumentNodeType.dnCell);
dnCell.IsTerminated = true;
if (fsThis.ITAP > 1)
{
_rtfBuilder.Append("\\nestcell");
_rtfBuilder.Append("{\\nonesttables\\par}");
}
else
{
_rtfBuilder.Append("\\cell");
}
_rtfBuilder.Append("\r\n");
}
else
{
_rtfBuilder.Append("\\par");
}
_rtfBuilder.Append("}");
_rtfBuilder.Append("\r\n");
}