本文整理匯總了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");
}