本文整理汇总了C#中ParagraphProperties.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# ParagraphProperties.Clone方法的具体用法?C# ParagraphProperties.Clone怎么用?C# ParagraphProperties.Clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParagraphProperties
的用法示例。
在下文中一共展示了ParagraphProperties.Clone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateText_02
//public static void AddText(Body body, int line, ParagraphProperties paragraphProperties = null)
public static IEnumerable<OpenXmlElement> CreateText_02(int line, ParagraphProperties paragraphProperties = null)
{
//Paragraph paragraph = body.AppendChild(new Paragraph());
Paragraph paragraph = new Paragraph();
Run run = paragraph.AppendChild(new Run());
run.AppendChild(new DW.Text("test"));
yield return paragraph;
for (int i = 0; i < line; i++)
{
//paragraph = body.AppendChild(new Paragraph());
paragraph = new Paragraph();
if (paragraphProperties != null)
paragraph.ParagraphProperties = (ParagraphProperties)paragraphProperties.Clone();
run = paragraph.AppendChild(new Run());
yield return paragraph;
}
}
示例2: CreateText_01
//public static void AddText(Body body, ParagraphProperties paragraphProperties = null)
public static IEnumerable<OpenXmlElement> CreateText_01(ParagraphProperties paragraphProperties = null)
{
//Paragraph paragraph = body.AppendChild(new Paragraph());
Paragraph paragraph = new Paragraph();
Run run = paragraph.AppendChild(new Run());
run.AppendChild(new DW.Text("zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo"));
run.AppendChild(new Break());
run.AppendChild(new DW.Text("zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo"));
run.AppendChild(new Break());
run.AppendChild(new DW.Text("zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo zozo"));
yield return paragraph;
//paragraph = body.AppendChild(new Paragraph());
paragraph = new Paragraph();
if (paragraphProperties != null)
paragraph.ParagraphProperties = (ParagraphProperties)paragraphProperties.Clone();
run = paragraph.AppendChild(new Run());
yield return paragraph;
//paragraph = body.AppendChild(new Paragraph());
paragraph = new Paragraph();
//if (paragraphProperties != null)
// paragraph.ParagraphProperties = (ParagraphProperties)paragraphProperties.Clone();
run = paragraph.AppendChild(new Run());
run.AppendChild(new DW.Text("toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto"));
run.AppendChild(new Break());
run.AppendChild(new DW.Text("toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto"));
run.AppendChild(new Break());
run.AppendChild(new DW.Text("toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto toto"));
yield return paragraph;
//paragraph = body.AppendChild(new Paragraph());
paragraph = new Paragraph();
if (paragraphProperties != null)
paragraph.ParagraphProperties = (ParagraphProperties)paragraphProperties.Clone();
run = paragraph.AppendChild(new Run());
yield return paragraph;
//paragraph = body.AppendChild(new Paragraph());
paragraph = new Paragraph();
//if (paragraphProperties != null)
// paragraph.ParagraphProperties = (ParagraphProperties)paragraphProperties.Clone();
run = paragraph.AppendChild(new Run());
run.AppendChild(new DW.Text("tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata"));
run.AppendChild(new Break());
run.AppendChild(new DW.Text("tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata"));
run.AppendChild(new Break());
run.AppendChild(new DW.Text("tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata tata"));
yield return paragraph;
//paragraph = body.AppendChild(new Paragraph());
for (int i = 0; i < 11; i++)
{
paragraph = new Paragraph();
run = paragraph.AppendChild(new Run());
yield return paragraph;
}
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
//paragraph = body.AppendChild(new Paragraph());
//run = paragraph.AppendChild(new Run());
}