// Generates content of mainDocumentPart1.
        private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
        {
            Document document1 = new Document(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15 wp14" }  };
            document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2010/11/wordml");
            document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Body body1 = new Body();

            SdtBlock sdtBlock1 = new SdtBlock();

            SdtProperties sdtProperties1 = new SdtProperties();

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts1 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties1.Append(runFonts1);
            SdtAlias sdtAlias1 = new SdtAlias(){ Val = "Test1.1.1" };
            Tag tag1 = new Tag(){ Val = "Test1.1.1" };
            SdtId sdtId1 = new SdtId(){ Val = -1832063964 };

            SdtPlaceholder sdtPlaceholder1 = new SdtPlaceholder();
            DocPartReference docPartReference1 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868558" };

            sdtPlaceholder1.Append(docPartReference1);
            ShowingPlaceholder showingPlaceholder1 = new ShowingPlaceholder();
            SdtContentText sdtContentText1 = new SdtContentText();

            sdtProperties1.Append(runProperties1);
            sdtProperties1.Append(sdtAlias1);
            sdtProperties1.Append(tag1);
            sdtProperties1.Append(sdtId1);
            sdtProperties1.Append(sdtPlaceholder1);
            sdtProperties1.Append(showingPlaceholder1);
            sdtProperties1.Append(sdtContentText1);
            SdtEndCharProperties sdtEndCharProperties1 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock1 = new SdtContentBlock();

            Paragraph paragraph1 = new Paragraph(){ RsidParagraphAddition = "00535C5E", RsidRunAdditionDefault = "000010BA" };

            Run run1 = new Run(){ RsidRunProperties = "003E0DED" };

            RunProperties runProperties2 = new RunProperties();
            RunStyle runStyle1 = new RunStyle(){ Val = "PlaceholderText" };

            runProperties2.Append(runStyle1);
            Text text1 = new Text();
            text1.Text = "Click here to enter text.";

            run1.Append(runProperties2);
            run1.Append(text1);

            paragraph1.Append(run1);

            sdtContentBlock1.Append(paragraph1);

            sdtBlock1.Append(sdtProperties1);
            sdtBlock1.Append(sdtEndCharProperties1);
            sdtBlock1.Append(sdtContentBlock1);

            SdtBlock sdtBlock2 = new SdtBlock();

            SdtProperties sdtProperties2 = new SdtProperties();

            RunProperties runProperties3 = new RunProperties();
            RunFonts runFonts2 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties3.Append(runFonts2);
            SdtAlias sdtAlias2 = new SdtAlias(){ Val = "Test1.1.2" };
            Tag tag2 = new Tag(){ Val = "Test1.1.2" };
            SdtId sdtId2 = new SdtId(){ Val = -2043657734 };

            SdtPlaceholder sdtPlaceholder2 = new SdtPlaceholder();
            DocPartReference docPartReference2 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868558" };

            sdtPlaceholder2.Append(docPartReference2);
            SdtContentText sdtContentText2 = new SdtContentText();

            sdtProperties2.Append(runProperties3);
            sdtProperties2.Append(sdtAlias2);
            sdtProperties2.Append(tag2);
            sdtProperties2.Append(sdtId2);
            sdtProperties2.Append(sdtPlaceholder2);
            sdtProperties2.Append(sdtContentText2);
            SdtEndCharProperties sdtEndCharProperties2 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock2 = new SdtContentBlock();

            Paragraph paragraph2 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };

            Run run2 = new Run();

            RunProperties runProperties4 = new RunProperties();
            RunFonts runFonts3 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties4.Append(runFonts3);
            Text text2 = new Text();
            text2.Text = "Test string";

            run2.Append(runProperties4);
            run2.Append(text2);

            paragraph2.Append(run2);

            sdtContentBlock2.Append(paragraph2);

            sdtBlock2.Append(sdtProperties2);
            sdtBlock2.Append(sdtEndCharProperties2);
            sdtBlock2.Append(sdtContentBlock2);

            SdtBlock sdtBlock3 = new SdtBlock();

            SdtProperties sdtProperties3 = new SdtProperties();

            RunProperties runProperties5 = new RunProperties();
            RunFonts runFonts4 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties5.Append(runFonts4);
            SdtAlias sdtAlias3 = new SdtAlias(){ Val = "Test1.2.1" };
            Tag tag3 = new Tag(){ Val = "Test1.2.1" };
            SdtId sdtId3 = new SdtId(){ Val = 401180698 };

            SdtPlaceholder sdtPlaceholder3 = new SdtPlaceholder();
            DocPartReference docPartReference3 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868558" };

            sdtPlaceholder3.Append(docPartReference3);
            SdtContentText sdtContentText3 = new SdtContentText();

            sdtProperties3.Append(runProperties5);
            sdtProperties3.Append(sdtAlias3);
            sdtProperties3.Append(tag3);
            sdtProperties3.Append(sdtId3);
            sdtProperties3.Append(sdtPlaceholder3);
            sdtProperties3.Append(sdtContentText3);
            SdtEndCharProperties sdtEndCharProperties3 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock3 = new SdtContentBlock();

            Paragraph paragraph3 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };

            Run run3 = new Run();

            RunProperties runProperties6 = new RunProperties();
            RunFonts runFonts5 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties6.Append(runFonts5);
            Text text3 = new Text();
            text3.Text = "Appearance1";

            run3.Append(runProperties6);
            run3.Append(text3);

            paragraph3.Append(run3);

            sdtContentBlock3.Append(paragraph3);

            sdtBlock3.Append(sdtProperties3);
            sdtBlock3.Append(sdtEndCharProperties3);
            sdtBlock3.Append(sdtContentBlock3);

            SdtBlock sdtBlock4 = new SdtBlock();

            SdtProperties sdtProperties4 = new SdtProperties();

            RunProperties runProperties7 = new RunProperties();
            RunFonts runFonts6 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties7.Append(runFonts6);
            SdtAlias sdtAlias4 = new SdtAlias(){ Val = "Test1.2.2" };
            Tag tag4 = new Tag(){ Val = "Test1.2.2" };
            SdtId sdtId4 = new SdtId(){ Val = 2096980748 };

            SdtPlaceholder sdtPlaceholder4 = new SdtPlaceholder();
            DocPartReference docPartReference4 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868558" };

            sdtPlaceholder4.Append(docPartReference4);
            W15.Appearance appearance1 = new W15.Appearance(){ Val = W15.SdtAppearance.Tags };
            SdtContentText sdtContentText4 = new SdtContentText();

            sdtProperties4.Append(runProperties7);
            sdtProperties4.Append(sdtAlias4);
            sdtProperties4.Append(tag4);
            sdtProperties4.Append(sdtId4);
            sdtProperties4.Append(sdtPlaceholder4);
            sdtProperties4.Append(appearance1);
            sdtProperties4.Append(sdtContentText4);
            SdtEndCharProperties sdtEndCharProperties4 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock4 = new SdtContentBlock();

            Paragraph paragraph4 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };

            Run run4 = new Run();

            RunProperties runProperties8 = new RunProperties();
            RunFonts runFonts7 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties8.Append(runFonts7);
            Text text4 = new Text();
            text4.Text = "Appearance2";

            run4.Append(runProperties8);
            run4.Append(text4);

            paragraph4.Append(run4);

            sdtContentBlock4.Append(paragraph4);

            sdtBlock4.Append(sdtProperties4);
            sdtBlock4.Append(sdtEndCharProperties4);
            sdtBlock4.Append(sdtContentBlock4);

            SdtBlock sdtBlock5 = new SdtBlock();

            SdtProperties sdtProperties5 = new SdtProperties();

            RunProperties runProperties9 = new RunProperties();
            RunFonts runFonts8 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties9.Append(runFonts8);
            SdtAlias sdtAlias5 = new SdtAlias(){ Val = "Test1.2.3" };
            Tag tag5 = new Tag(){ Val = "Test1.2.3" };
            SdtId sdtId5 = new SdtId(){ Val = -343394056 };

            SdtPlaceholder sdtPlaceholder5 = new SdtPlaceholder();
            DocPartReference docPartReference5 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868558" };

            sdtPlaceholder5.Append(docPartReference5);
            W15.Appearance appearance2 = new W15.Appearance(){ Val = W15.SdtAppearance.Hidden };
            SdtContentText sdtContentText5 = new SdtContentText();

            sdtProperties5.Append(runProperties9);
            sdtProperties5.Append(sdtAlias5);
            sdtProperties5.Append(tag5);
            sdtProperties5.Append(sdtId5);
            sdtProperties5.Append(sdtPlaceholder5);
            sdtProperties5.Append(appearance2);
            sdtProperties5.Append(sdtContentText5);
            SdtEndCharProperties sdtEndCharProperties5 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock5 = new SdtContentBlock();

            Paragraph paragraph5 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };

            Run run5 = new Run();

            RunProperties runProperties10 = new RunProperties();
            RunFonts runFonts9 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties10.Append(runFonts9);
            Text text5 = new Text();
            text5.Text = "Appearance3";

            run5.Append(runProperties10);
            run5.Append(text5);

            paragraph5.Append(run5);

            sdtContentBlock5.Append(paragraph5);

            sdtBlock5.Append(sdtProperties5);
            sdtBlock5.Append(sdtEndCharProperties5);
            sdtBlock5.Append(sdtContentBlock5);

            SdtBlock sdtBlock6 = new SdtBlock();

            SdtProperties sdtProperties6 = new SdtProperties();

            RunProperties runProperties11 = new RunProperties();
            RunFonts runFonts10 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties11.Append(runFonts10);
            SdtAlias sdtAlias6 = new SdtAlias(){ Val = "Test1.3.1" };
            Tag tag6 = new Tag(){ Val = "Test1.3.1" };
            SdtId sdtId6 = new SdtId(){ Val = 1119424041 };

            SdtPlaceholder sdtPlaceholder6 = new SdtPlaceholder();
            DocPartReference docPartReference6 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868558" };

            sdtPlaceholder6.Append(docPartReference6);
            SdtContentText sdtContentText6 = new SdtContentText();

            sdtProperties6.Append(runProperties11);
            sdtProperties6.Append(sdtAlias6);
            sdtProperties6.Append(tag6);
            sdtProperties6.Append(sdtId6);
            sdtProperties6.Append(sdtPlaceholder6);
            sdtProperties6.Append(sdtContentText6);
            SdtEndCharProperties sdtEndCharProperties6 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock6 = new SdtContentBlock();

            Paragraph paragraph6 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };

            Run run6 = new Run();

            RunProperties runProperties12 = new RunProperties();
            RunFonts runFonts11 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties12.Append(runFonts11);
            Text text6 = new Text();
            text6.Text = "Color Content Control1";

            run6.Append(runProperties12);
            run6.Append(text6);

            paragraph6.Append(run6);

            sdtContentBlock6.Append(paragraph6);

            sdtBlock6.Append(sdtProperties6);
            sdtBlock6.Append(sdtEndCharProperties6);
            sdtBlock6.Append(sdtContentBlock6);

            SdtBlock sdtBlock7 = new SdtBlock();

            SdtProperties sdtProperties7 = new SdtProperties();

            RunProperties runProperties13 = new RunProperties();
            RunFonts runFonts12 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties13.Append(runFonts12);
            SdtAlias sdtAlias7 = new SdtAlias(){ Val = "Test1.3.2" };
            Tag tag7 = new Tag(){ Val = "Test1.3.2" };
            SdtId sdtId7 = new SdtId(){ Val = 550972260 };

            SdtPlaceholder sdtPlaceholder7 = new SdtPlaceholder();
            DocPartReference docPartReference7 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868558" };

            sdtPlaceholder7.Append(docPartReference7);
            W15.Color color1 = new W15.Color(){ Val = "0000FF" };
            SdtContentText sdtContentText7 = new SdtContentText();

            sdtProperties7.Append(runProperties13);
            sdtProperties7.Append(sdtAlias7);
            sdtProperties7.Append(tag7);
            sdtProperties7.Append(sdtId7);
            sdtProperties7.Append(sdtPlaceholder7);
            sdtProperties7.Append(color1);
            sdtProperties7.Append(sdtContentText7);
            SdtEndCharProperties sdtEndCharProperties7 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock7 = new SdtContentBlock();

            Paragraph paragraph7 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };

            Run run7 = new Run();

            RunProperties runProperties14 = new RunProperties();
            RunFonts runFonts13 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties14.Append(runFonts13);
            Text text7 = new Text();
            text7.Text = "Color Content Control2";

            run7.Append(runProperties14);
            run7.Append(text7);

            paragraph7.Append(run7);

            sdtContentBlock7.Append(paragraph7);

            sdtBlock7.Append(sdtProperties7);
            sdtBlock7.Append(sdtEndCharProperties7);
            sdtBlock7.Append(sdtContentBlock7);

            SdtBlock sdtBlock8 = new SdtBlock();

            SdtProperties sdtProperties8 = new SdtProperties();

            RunProperties runProperties15 = new RunProperties();
            RunFonts runFonts14 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties15.Append(runFonts14);
            SdtAlias sdtAlias8 = new SdtAlias(){ Val = "Test1.4.1" };
            Tag tag8 = new Tag(){ Val = "Test1.4.1" };
            SdtId sdtId8 = new SdtId(){ Val = 1758249604 };
            W15.SdtRepeatedSection sdtRepeatedSection1 = new W15.SdtRepeatedSection();

            sdtProperties8.Append(runProperties15);
            sdtProperties8.Append(sdtAlias8);
            sdtProperties8.Append(tag8);
            sdtProperties8.Append(sdtId8);
            sdtProperties8.Append(sdtRepeatedSection1);
            SdtEndCharProperties sdtEndCharProperties8 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock8 = new SdtContentBlock();

            SdtBlock sdtBlock9 = new SdtBlock();

            SdtProperties sdtProperties9 = new SdtProperties();

            RunProperties runProperties16 = new RunProperties();
            RunFonts runFonts15 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties16.Append(runFonts15);
            SdtId sdtId9 = new SdtId(){ Val = 481433089 };

            SdtPlaceholder sdtPlaceholder8 = new SdtPlaceholder();
            DocPartReference docPartReference8 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868562" };

            sdtPlaceholder8.Append(docPartReference8);
            ShowingPlaceholder showingPlaceholder2 = new ShowingPlaceholder();
            W15.SdtRepeatedSectionItem sdtRepeatedSectionItem1 = new W15.SdtRepeatedSectionItem();

            sdtProperties9.Append(runProperties16);
            sdtProperties9.Append(sdtId9);
            sdtProperties9.Append(sdtPlaceholder8);
            sdtProperties9.Append(showingPlaceholder2);
            sdtProperties9.Append(sdtRepeatedSectionItem1);
            SdtEndCharProperties sdtEndCharProperties9 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock9 = new SdtContentBlock();

            Paragraph paragraph8 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };

            Run run8 = new Run(){ RsidRunProperties = "003E0DED" };

            RunProperties runProperties17 = new RunProperties();
            RunStyle runStyle2 = new RunStyle(){ Val = "PlaceholderText" };

            runProperties17.Append(runStyle2);
            Text text8 = new Text();
            text8.Text = "Enter any content that you want to repeat, including other content controls. You can also insert this control around table rows in order to repeat parts of a table.";

            run8.Append(runProperties17);
            run8.Append(text8);

            paragraph8.Append(run8);

            sdtContentBlock9.Append(paragraph8);

            sdtBlock9.Append(sdtProperties9);
            sdtBlock9.Append(sdtEndCharProperties9);
            sdtBlock9.Append(sdtContentBlock9);

            sdtContentBlock8.Append(sdtBlock9);

            sdtBlock8.Append(sdtProperties8);
            sdtBlock8.Append(sdtEndCharProperties8);
            sdtBlock8.Append(sdtContentBlock8);

            SdtBlock sdtBlock10 = new SdtBlock();

            SdtProperties sdtProperties10 = new SdtProperties();

            RunProperties runProperties18 = new RunProperties();
            RunFonts runFonts16 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties18.Append(runFonts16);
            SdtAlias sdtAlias9 = new SdtAlias(){ Val = "Test1.4.2" };
            Tag tag9 = new Tag(){ Val = "Test1.4.2" };
            SdtId sdtId10 = new SdtId(){ Val = -78606169 };
            W15.SdtRepeatedSection sdtRepeatedSection2 = new W15.SdtRepeatedSection();

            sdtProperties10.Append(runProperties18);
            sdtProperties10.Append(sdtAlias9);
            sdtProperties10.Append(tag9);
            sdtProperties10.Append(sdtId10);
            sdtProperties10.Append(sdtRepeatedSection2);
            SdtEndCharProperties sdtEndCharProperties10 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock10 = new SdtContentBlock();

            SdtBlock sdtBlock11 = new SdtBlock();

            SdtProperties sdtProperties11 = new SdtProperties();

            RunProperties runProperties19 = new RunProperties();
            RunFonts runFonts17 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties19.Append(runFonts17);
            SdtId sdtId11 = new SdtId(){ Val = -1356270719 };

            SdtPlaceholder sdtPlaceholder9 = new SdtPlaceholder();
            DocPartReference docPartReference9 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868562" };

            sdtPlaceholder9.Append(docPartReference9);
            W15.SdtRepeatedSectionItem sdtRepeatedSectionItem2 = new W15.SdtRepeatedSectionItem();

            sdtProperties11.Append(runProperties19);
            sdtProperties11.Append(sdtId11);
            sdtProperties11.Append(sdtPlaceholder9);
            sdtProperties11.Append(sdtRepeatedSectionItem2);
            SdtEndCharProperties sdtEndCharProperties11 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock11 = new SdtContentBlock();

            Paragraph paragraph9 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };
            ProofError proofError1 = new ProofError(){ Type = ProofingErrorValues.SpellStart };
            ProofError proofError2 = new ProofError(){ Type = ProofingErrorValues.GrammarStart };

            Run run9 = new Run();

            RunProperties runProperties20 = new RunProperties();
            RunFonts runFonts18 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties20.Append(runFonts18);
            Text text9 = new Text();
            text9.Text = "repeatingSectionItem";

            run9.Append(runProperties20);
            run9.Append(text9);
            ProofError proofError3 = new ProofError(){ Type = ProofingErrorValues.SpellEnd };
            ProofError proofError4 = new ProofError(){ Type = ProofingErrorValues.GrammarEnd };

            paragraph9.Append(proofError1);
            paragraph9.Append(proofError2);
            paragraph9.Append(run9);
            paragraph9.Append(proofError3);
            paragraph9.Append(proofError4);

            sdtContentBlock11.Append(paragraph9);

            sdtBlock11.Append(sdtProperties11);
            sdtBlock11.Append(sdtEndCharProperties11);
            sdtBlock11.Append(sdtContentBlock11);

            sdtContentBlock10.Append(sdtBlock11);

            sdtBlock10.Append(sdtProperties10);
            sdtBlock10.Append(sdtEndCharProperties10);
            sdtBlock10.Append(sdtContentBlock10);

            SdtBlock sdtBlock12 = new SdtBlock();

            SdtProperties sdtProperties12 = new SdtProperties();

            RunProperties runProperties21 = new RunProperties();
            RunFonts runFonts19 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties21.Append(runFonts19);
            SdtAlias sdtAlias10 = new SdtAlias(){ Val = "Test1.4.3" };
            Tag tag10 = new Tag(){ Val = "Test1.4.3" };
            SdtId sdtId12 = new SdtId(){ Val = -294221661 };

            W15.SdtRepeatedSection sdtRepeatedSection3 = new W15.SdtRepeatedSection();
            W15.DoNotAllowInsertDeleteSection doNotAllowInsertDeleteSection1 = new W15.DoNotAllowInsertDeleteSection(){ Val = true };

            sdtRepeatedSection3.Append(doNotAllowInsertDeleteSection1);

            sdtProperties12.Append(runProperties21);
            sdtProperties12.Append(sdtAlias10);
            sdtProperties12.Append(tag10);
            sdtProperties12.Append(sdtId12);
            sdtProperties12.Append(sdtRepeatedSection3);
            SdtEndCharProperties sdtEndCharProperties12 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock12 = new SdtContentBlock();

            SdtBlock sdtBlock13 = new SdtBlock();

            SdtProperties sdtProperties13 = new SdtProperties();

            RunProperties runProperties22 = new RunProperties();
            RunFonts runFonts20 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties22.Append(runFonts20);
            SdtId sdtId13 = new SdtId(){ Val = 2112001363 };
            Lock lock1 = new Lock(){ Val = LockingValues.SdtLocked };

            SdtPlaceholder sdtPlaceholder10 = new SdtPlaceholder();
            DocPartReference docPartReference10 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868562" };

            sdtPlaceholder10.Append(docPartReference10);
            W15.SdtRepeatedSectionItem sdtRepeatedSectionItem3 = new W15.SdtRepeatedSectionItem();

            sdtProperties13.Append(runProperties22);
            sdtProperties13.Append(sdtId13);
            sdtProperties13.Append(lock1);
            sdtProperties13.Append(sdtPlaceholder10);
            sdtProperties13.Append(sdtRepeatedSectionItem3);
            SdtEndCharProperties sdtEndCharProperties13 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock13 = new SdtContentBlock();

            Paragraph paragraph10 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };
            ProofError proofError5 = new ProofError(){ Type = ProofingErrorValues.SpellStart };
            ProofError proofError6 = new ProofError(){ Type = ProofingErrorValues.GrammarStart };

            Run run10 = new Run();

            RunProperties runProperties23 = new RunProperties();
            RunFonts runFonts21 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties23.Append(runFonts21);
            Text text10 = new Text();
            text10.Text = "doNotAllowInsertDeleteSection";

            run10.Append(runProperties23);
            run10.Append(text10);
            ProofError proofError7 = new ProofError(){ Type = ProofingErrorValues.SpellEnd };
            ProofError proofError8 = new ProofError(){ Type = ProofingErrorValues.GrammarEnd };

            paragraph10.Append(proofError5);
            paragraph10.Append(proofError6);
            paragraph10.Append(run10);
            paragraph10.Append(proofError7);
            paragraph10.Append(proofError8);

            sdtContentBlock13.Append(paragraph10);

            sdtBlock13.Append(sdtProperties13);
            sdtBlock13.Append(sdtEndCharProperties13);
            sdtBlock13.Append(sdtContentBlock13);

            sdtContentBlock12.Append(sdtBlock13);

            sdtBlock12.Append(sdtProperties12);
            sdtBlock12.Append(sdtEndCharProperties12);
            sdtBlock12.Append(sdtContentBlock12);

            SdtBlock sdtBlock14 = new SdtBlock();

            SdtProperties sdtProperties14 = new SdtProperties();

            RunProperties runProperties24 = new RunProperties();
            RunFonts runFonts22 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties24.Append(runFonts22);
            SdtAlias sdtAlias11 = new SdtAlias(){ Val = "Test1.4.4" };
            Tag tag11 = new Tag(){ Val = "Test1.4.4" };
            SdtId sdtId14 = new SdtId(){ Val = -248501389 };

            W15.SdtRepeatedSection sdtRepeatedSection4 = new W15.SdtRepeatedSection();
            W15.SectionTitle sectionTitle1 = new W15.SectionTitle(){ Val = "Section title string" };

            sdtRepeatedSection4.Append(sectionTitle1);

            sdtProperties14.Append(runProperties24);
            sdtProperties14.Append(sdtAlias11);
            sdtProperties14.Append(tag11);
            sdtProperties14.Append(sdtId14);
            sdtProperties14.Append(sdtRepeatedSection4);
            SdtEndCharProperties sdtEndCharProperties14 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock14 = new SdtContentBlock();

            SdtBlock sdtBlock15 = new SdtBlock();

            SdtProperties sdtProperties15 = new SdtProperties();

            RunProperties runProperties25 = new RunProperties();
            RunFonts runFonts23 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties25.Append(runFonts23);
            SdtId sdtId15 = new SdtId(){ Val = 1971018620 };

            SdtPlaceholder sdtPlaceholder11 = new SdtPlaceholder();
            DocPartReference docPartReference11 = new DocPartReference(){ Val = "DefaultPlaceholder_1081868562" };

            sdtPlaceholder11.Append(docPartReference11);
            W15.SdtRepeatedSectionItem sdtRepeatedSectionItem4 = new W15.SdtRepeatedSectionItem();

            sdtProperties15.Append(runProperties25);
            sdtProperties15.Append(sdtId15);
            sdtProperties15.Append(sdtPlaceholder11);
            sdtProperties15.Append(sdtRepeatedSectionItem4);
            SdtEndCharProperties sdtEndCharProperties15 = new SdtEndCharProperties();

            SdtContentBlock sdtContentBlock15 = new SdtContentBlock();

            Paragraph paragraph11 = new Paragraph(){ RsidParagraphAddition = "000010BA", RsidRunAdditionDefault = "000010BA" };
            ProofError proofError9 = new ProofError(){ Type = ProofingErrorValues.SpellStart };
            ProofError proofError10 = new ProofError(){ Type = ProofingErrorValues.GrammarStart };

            Run run11 = new Run();

            RunProperties runProperties26 = new RunProperties();
            RunFonts runFonts24 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties26.Append(runFonts24);
            Text text11 = new Text();
            text11.Text = "sectionTitle";

            run11.Append(runProperties26);
            run11.Append(text11);
            ProofError proofError11 = new ProofError(){ Type = ProofingErrorValues.SpellEnd };
            ProofError proofError12 = new ProofError(){ Type = ProofingErrorValues.GrammarEnd };

            paragraph11.Append(proofError9);
            paragraph11.Append(proofError10);
            paragraph11.Append(run11);
            paragraph11.Append(proofError11);
            paragraph11.Append(proofError12);

            sdtContentBlock15.Append(paragraph11);

            sdtBlock15.Append(sdtProperties15);
            sdtBlock15.Append(sdtEndCharProperties15);
            sdtBlock15.Append(sdtContentBlock15);

            sdtContentBlock14.Append(sdtBlock15);

            sdtBlock14.Append(sdtProperties14);
            sdtBlock14.Append(sdtEndCharProperties14);
            sdtBlock14.Append(sdtContentBlock14);

            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableWidth tableWidth1 = new TableWidth(){ Width = "0", Type = TableWidthUnitValues.Auto };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder topBorder1 = new TopBorder(){ Val = BorderValues.Double, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            LeftBorder leftBorder1 = new LeftBorder(){ Val = BorderValues.Double, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder1 = new BottomBorder(){ Val = BorderValues.Double, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder(){ Val = BorderValues.Double, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder(){ Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder(){ Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);
            TableLayout tableLayout1 = new TableLayout(){ Type = TableLayoutValues.Fixed };
            TableLook tableLook1 = new TableLook(){ Val = "0000" };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableLayout1);
            tableProperties1.Append(tableLook1);

            TableGrid tableGrid1 = new TableGrid();
            GridColumn gridColumn1 = new GridColumn(){ Width = "4788" };
            GridColumn gridColumn2 = new GridColumn(){ Width = "4788" };

            tableGrid1.Append(gridColumn1);
            tableGrid1.Append(gridColumn2);

            SdtRow sdtRow1 = new SdtRow();

            SdtProperties sdtProperties16 = new SdtProperties();
            SdtId sdtId16 = new SdtId(){ Val = 1391384564 };

            SdtPlaceholder sdtPlaceholder12 = new SdtPlaceholder();
            DocPartReference docPartReference12 = new DocPartReference(){ Val = "B207B2DF6D0E4E13956E6616811860CA" };

            sdtPlaceholder12.Append(docPartReference12);
            W15.DataBinding dataBinding1 = new W15.DataBinding(){ XPath = "/books[1]/book", StoreItemId = "{F6DB09CA-2A79-464E-B71A-D37E08A01059}" };
            W15.Appearance appearance3 = new W15.Appearance(){ Val = W15.SdtAppearance.Tags };
            W15.SdtRepeatedSection sdtRepeatedSection5 = new W15.SdtRepeatedSection();

            sdtProperties16.Append(sdtId16);
            sdtProperties16.Append(sdtPlaceholder12);
            sdtProperties16.Append(dataBinding1);
            sdtProperties16.Append(appearance3);
            sdtProperties16.Append(sdtRepeatedSection5);
            SdtEndCharProperties sdtEndCharProperties16 = new SdtEndCharProperties();

            SdtContentRow sdtContentRow1 = new SdtContentRow();

            SdtRow sdtRow2 = new SdtRow();

            SdtProperties sdtProperties17 = new SdtProperties();
            SdtId sdtId17 = new SdtId(){ Val = 1787311118 };
            W15.Appearance appearance4 = new W15.Appearance(){ Val = W15.SdtAppearance.Tags };
            W15.SdtRepeatedSectionItem sdtRepeatedSectionItem5 = new W15.SdtRepeatedSectionItem();

            sdtProperties17.Append(sdtId17);
            sdtProperties17.Append(appearance4);
            sdtProperties17.Append(sdtRepeatedSectionItem5);
            SdtEndCharProperties sdtEndCharProperties17 = new SdtEndCharProperties();

            SdtContentRow sdtContentRow2 = new SdtContentRow();

            TableRow tableRow1 = new TableRow(){ RsidTableRowAddition = "00E930A2", RsidTableRowProperties = "00242789" };

            SdtCell sdtCell1 = new SdtCell();

            SdtProperties sdtProperties18 = new SdtProperties();
            SdtAlias sdtAlias12 = new SdtAlias(){ Val = "Test1.5.1_1" };
            Tag tag12 = new Tag(){ Val = "Test1.5.1_1" };
            SdtId sdtId18 = new SdtId(){ Val = -1276551752 };

            SdtPlaceholder sdtPlaceholder13 = new SdtPlaceholder();
            DocPartReference docPartReference13 = new DocPartReference(){ Val = "B207B2DF6D0E4E13956E6616811860CA" };

            sdtPlaceholder13.Append(docPartReference13);
            DataBinding dataBinding2 = new DataBinding(){ XPath = "/books[1]/book[1]/title[1]", StoreItemId = "{F6DB09CA-2A79-464E-B71A-D37E08A01059}" };
            SdtContentText sdtContentText8 = new SdtContentText();

            sdtProperties18.Append(sdtAlias12);
            sdtProperties18.Append(tag12);
            sdtProperties18.Append(sdtId18);
            sdtProperties18.Append(sdtPlaceholder13);
            sdtProperties18.Append(dataBinding2);
            sdtProperties18.Append(sdtContentText8);
            SdtEndCharProperties sdtEndCharProperties18 = new SdtEndCharProperties();

            SdtContentCell sdtContentCell1 = new SdtContentCell();

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth tableCellWidth1 = new TableCellWidth(){ Width = "4788", Type = TableWidthUnitValues.Dxa };
            Shading shading1 = new Shading(){ Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

            tableCellProperties1.Append(tableCellWidth1);
            tableCellProperties1.Append(shading1);

            Paragraph paragraph12 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidParagraphProperties = "00E86739", RsidRunAdditionDefault = "00E930A2" };

            Run run12 = new Run();

            RunProperties runProperties27 = new RunProperties();
            RunFonts runFonts25 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties27.Append(runFonts25);
            Text text12 = new Text();
            text12.Text = "Repeating Section,Row1";

            run12.Append(runProperties27);
            run12.Append(text12);

            Run run13 = new Run(){ RsidRunAddition = "00E86739" };

            RunProperties runProperties28 = new RunProperties();
            RunFonts runFonts26 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties28.Append(runFonts26);
            Text text13 = new Text();
            text13.Text = ",Cell1";

            run13.Append(runProperties28);
            run13.Append(text13);

            paragraph12.Append(run12);
            paragraph12.Append(run13);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph12);

            sdtContentCell1.Append(tableCell1);

            sdtCell1.Append(sdtProperties18);
            sdtCell1.Append(sdtEndCharProperties18);
            sdtCell1.Append(sdtContentCell1);

            SdtCell sdtCell2 = new SdtCell();

            SdtProperties sdtProperties19 = new SdtProperties();

            RunProperties runProperties29 = new RunProperties();
            Kern kern1 = new Kern(){ Val = (UInt32Value)0U };

            runProperties29.Append(kern1);
            SdtAlias sdtAlias13 = new SdtAlias(){ Val = "Test1.5.1_2" };
            Tag tag13 = new Tag(){ Val = "Test1.5.1_2" };
            SdtId sdtId19 = new SdtId(){ Val = -1317331761 };

            SdtPlaceholder sdtPlaceholder14 = new SdtPlaceholder();
            DocPartReference docPartReference14 = new DocPartReference(){ Val = "B207B2DF6D0E4E13956E6616811860CA" };

            sdtPlaceholder14.Append(docPartReference14);
            DataBinding dataBinding3 = new DataBinding(){ XPath = "/books[1]/book[1]/author[1]", StoreItemId = "{F6DB09CA-2A79-464E-B71A-D37E08A01059}" };
            SdtContentText sdtContentText9 = new SdtContentText();

            sdtProperties19.Append(runProperties29);
            sdtProperties19.Append(sdtAlias13);
            sdtProperties19.Append(tag13);
            sdtProperties19.Append(sdtId19);
            sdtProperties19.Append(sdtPlaceholder14);
            sdtProperties19.Append(dataBinding3);
            sdtProperties19.Append(sdtContentText9);
            SdtEndCharProperties sdtEndCharProperties19 = new SdtEndCharProperties();

            SdtContentCell sdtContentCell2 = new SdtContentCell();

            TableCell tableCell2 = new TableCell();

            TableCellProperties tableCellProperties2 = new TableCellProperties();
            TableCellWidth tableCellWidth2 = new TableCellWidth(){ Width = "4788", Type = TableWidthUnitValues.Dxa };
            Shading shading2 = new Shading(){ Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

            tableCellProperties2.Append(tableCellWidth2);
            tableCellProperties2.Append(shading2);

            Paragraph paragraph13 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidParagraphProperties = "00E86739", RsidRunAdditionDefault = "00E930A2" };

            Run run14 = new Run();

            RunProperties runProperties30 = new RunProperties();
            Kern kern2 = new Kern(){ Val = (UInt32Value)0U };

            runProperties30.Append(kern2);
            Text text14 = new Text();
            text14.Text = "Repeating Section";

            run14.Append(runProperties30);
            run14.Append(text14);

            Run run15 = new Run(){ RsidRunAddition = "00E86739" };

            RunProperties runProperties31 = new RunProperties();
            RunFonts runFonts27 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
            Kern kern3 = new Kern(){ Val = (UInt32Value)0U };

            runProperties31.Append(runFonts27);
            runProperties31.Append(kern3);
            Text text15 = new Text();
            text15.Text = ",";

            run15.Append(runProperties31);
            run15.Append(text15);

            Run run16 = new Run();

            RunProperties runProperties32 = new RunProperties();
            Kern kern4 = new Kern(){ Val = (UInt32Value)0U };

            runProperties32.Append(kern4);
            Text text16 = new Text();
            text16.Text = "Row1";

            run16.Append(runProperties32);
            run16.Append(text16);

            Run run17 = new Run(){ RsidRunAddition = "00E86739" };

            RunProperties runProperties33 = new RunProperties();
            RunFonts runFonts28 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
            Kern kern5 = new Kern(){ Val = (UInt32Value)0U };

            runProperties33.Append(runFonts28);
            runProperties33.Append(kern5);
            Text text17 = new Text();
            text17.Text = ",Cell2";

            run17.Append(runProperties33);
            run17.Append(text17);

            paragraph13.Append(run14);
            paragraph13.Append(run15);
            paragraph13.Append(run16);
            paragraph13.Append(run17);

            tableCell2.Append(tableCellProperties2);
            tableCell2.Append(paragraph13);

            sdtContentCell2.Append(tableCell2);

            sdtCell2.Append(sdtProperties19);
            sdtCell2.Append(sdtEndCharProperties19);
            sdtCell2.Append(sdtContentCell2);

            tableRow1.Append(sdtCell1);
            tableRow1.Append(sdtCell2);

            sdtContentRow2.Append(tableRow1);

            sdtRow2.Append(sdtProperties17);
            sdtRow2.Append(sdtEndCharProperties17);
            sdtRow2.Append(sdtContentRow2);

            SdtRow sdtRow3 = new SdtRow();

            SdtProperties sdtProperties20 = new SdtProperties();
            SdtId sdtId20 = new SdtId(){ Val = 689805002 };
            W15.Appearance appearance5 = new W15.Appearance(){ Val = W15.SdtAppearance.Tags };
            W15.SdtRepeatedSectionItem sdtRepeatedSectionItem6 = new W15.SdtRepeatedSectionItem();

            sdtProperties20.Append(sdtId20);
            sdtProperties20.Append(appearance5);
            sdtProperties20.Append(sdtRepeatedSectionItem6);
            SdtEndCharProperties sdtEndCharProperties20 = new SdtEndCharProperties();

            SdtContentRow sdtContentRow3 = new SdtContentRow();

            TableRow tableRow2 = new TableRow(){ RsidTableRowAddition = "00E930A2", RsidTableRowProperties = "00242789" };

            SdtCell sdtCell3 = new SdtCell();

            SdtProperties sdtProperties21 = new SdtProperties();
            SdtAlias sdtAlias14 = new SdtAlias(){ Val = "Test1.5.1_3" };
            Tag tag14 = new Tag(){ Val = "Test1.5.1_3" };
            SdtId sdtId21 = new SdtId(){ Val = 880594776 };

            SdtPlaceholder sdtPlaceholder15 = new SdtPlaceholder();
            DocPartReference docPartReference15 = new DocPartReference(){ Val = "4B632797D8B1461898B8F461443A20E0" };

            sdtPlaceholder15.Append(docPartReference15);
            DataBinding dataBinding4 = new DataBinding(){ XPath = "/books[1]/book[4]/title[1]", StoreItemId = "{F6DB09CA-2A79-464E-B71A-D37E08A01059}" };
            SdtContentText sdtContentText10 = new SdtContentText();

            sdtProperties21.Append(sdtAlias14);
            sdtProperties21.Append(tag14);
            sdtProperties21.Append(sdtId21);
            sdtProperties21.Append(sdtPlaceholder15);
            sdtProperties21.Append(dataBinding4);
            sdtProperties21.Append(sdtContentText10);

            SdtEndCharProperties sdtEndCharProperties21 = new SdtEndCharProperties();

            RunProperties runProperties34 = new RunProperties();
            Kern kern6 = new Kern(){ Val = (UInt32Value)0U };

            runProperties34.Append(kern6);

            sdtEndCharProperties21.Append(runProperties34);

            SdtContentCell sdtContentCell3 = new SdtContentCell();

            TableCell tableCell3 = new TableCell();

            TableCellProperties tableCellProperties3 = new TableCellProperties();
            TableCellWidth tableCellWidth3 = new TableCellWidth(){ Width = "4788", Type = TableWidthUnitValues.Dxa };
            Shading shading3 = new Shading(){ Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

            tableCellProperties3.Append(tableCellWidth3);
            tableCellProperties3.Append(shading3);

            Paragraph paragraph14 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidParagraphProperties = "00E86739", RsidRunAdditionDefault = "00E930A2" };

            Run run18 = new Run();

            RunProperties runProperties35 = new RunProperties();
            Kern kern7 = new Kern(){ Val = (UInt32Value)0U };

            runProperties35.Append(kern7);
            Text text18 = new Text();
            text18.Text = "Repeating Section";

            run18.Append(runProperties35);
            run18.Append(text18);

            Run run19 = new Run(){ RsidRunAddition = "00E86739" };

            RunProperties runProperties36 = new RunProperties();
            RunFonts runFonts29 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
            Kern kern8 = new Kern(){ Val = (UInt32Value)0U };

            runProperties36.Append(runFonts29);
            runProperties36.Append(kern8);
            Text text19 = new Text();
            text19.Text = ",";

            run19.Append(runProperties36);
            run19.Append(text19);

            Run run20 = new Run();

            RunProperties runProperties37 = new RunProperties();
            Kern kern9 = new Kern(){ Val = (UInt32Value)0U };

            runProperties37.Append(kern9);
            Text text20 = new Text();
            text20.Text = "Row";

            run20.Append(runProperties37);
            run20.Append(text20);

            Run run21 = new Run();

            RunProperties runProperties38 = new RunProperties();
            RunFonts runFonts30 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
            Kern kern10 = new Kern(){ Val = (UInt32Value)0U };

            runProperties38.Append(runFonts30);
            runProperties38.Append(kern10);
            Text text21 = new Text();
            text21.Text = "2";

            run21.Append(runProperties38);
            run21.Append(text21);

            Run run22 = new Run(){ RsidRunAddition = "00E86739" };

            RunProperties runProperties39 = new RunProperties();
            RunFonts runFonts31 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
            Kern kern11 = new Kern(){ Val = (UInt32Value)0U };

            runProperties39.Append(runFonts31);
            runProperties39.Append(kern11);
            Text text22 = new Text();
            text22.Text = ",Cell1";

            run22.Append(runProperties39);
            run22.Append(text22);

            paragraph14.Append(run18);
            paragraph14.Append(run19);
            paragraph14.Append(run20);
            paragraph14.Append(run21);
            paragraph14.Append(run22);

            tableCell3.Append(tableCellProperties3);
            tableCell3.Append(paragraph14);

            sdtContentCell3.Append(tableCell3);

            sdtCell3.Append(sdtProperties21);
            sdtCell3.Append(sdtEndCharProperties21);
            sdtCell3.Append(sdtContentCell3);

            SdtCell sdtCell4 = new SdtCell();

            SdtProperties sdtProperties22 = new SdtProperties();

            RunProperties runProperties40 = new RunProperties();
            Kern kern12 = new Kern(){ Val = (UInt32Value)0U };

            runProperties40.Append(kern12);
            SdtAlias sdtAlias15 = new SdtAlias(){ Val = "Test1.5.1_4" };
            Tag tag15 = new Tag(){ Val = "Test1.5.1_4" };
            SdtId sdtId22 = new SdtId(){ Val = -1022928317 };

            SdtPlaceholder sdtPlaceholder16 = new SdtPlaceholder();
            DocPartReference docPartReference16 = new DocPartReference(){ Val = "4B632797D8B1461898B8F461443A20E0" };

            sdtPlaceholder16.Append(docPartReference16);
            DataBinding dataBinding5 = new DataBinding(){ XPath = "/books[1]/book[4]/author[1]", StoreItemId = "{F6DB09CA-2A79-464E-B71A-D37E08A01059}" };
            SdtContentText sdtContentText11 = new SdtContentText();

            sdtProperties22.Append(runProperties40);
            sdtProperties22.Append(sdtAlias15);
            sdtProperties22.Append(tag15);
            sdtProperties22.Append(sdtId22);
            sdtProperties22.Append(sdtPlaceholder16);
            sdtProperties22.Append(dataBinding5);
            sdtProperties22.Append(sdtContentText11);
            SdtEndCharProperties sdtEndCharProperties22 = new SdtEndCharProperties();

            SdtContentCell sdtContentCell4 = new SdtContentCell();

            TableCell tableCell4 = new TableCell();

            TableCellProperties tableCellProperties4 = new TableCellProperties();
            TableCellWidth tableCellWidth4 = new TableCellWidth(){ Width = "4788", Type = TableWidthUnitValues.Dxa };
            Shading shading4 = new Shading(){ Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

            tableCellProperties4.Append(tableCellWidth4);
            tableCellProperties4.Append(shading4);

            Paragraph paragraph15 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidParagraphProperties = "00E86739", RsidRunAdditionDefault = "009651D6" };

            Run run23 = new Run();

            RunProperties runProperties41 = new RunProperties();
            Kern kern13 = new Kern(){ Val = (UInt32Value)0U };

            runProperties41.Append(kern13);
            Text text23 = new Text();
            text23.Text = "Repeating Section";

            run23.Append(runProperties41);
            run23.Append(text23);

            Run run24 = new Run(){ RsidRunAddition = "00E86739" };

            RunProperties runProperties42 = new RunProperties();
            RunFonts runFonts32 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
            Kern kern14 = new Kern(){ Val = (UInt32Value)0U };

            runProperties42.Append(runFonts32);
            runProperties42.Append(kern14);
            Text text24 = new Text();
            text24.Text = ",Row2,Cell2";

            run24.Append(runProperties42);
            run24.Append(text24);

            paragraph15.Append(run23);
            paragraph15.Append(run24);

            tableCell4.Append(tableCellProperties4);
            tableCell4.Append(paragraph15);

            sdtContentCell4.Append(tableCell4);

            sdtCell4.Append(sdtProperties22);
            sdtCell4.Append(sdtEndCharProperties22);
            sdtCell4.Append(sdtContentCell4);

            tableRow2.Append(sdtCell3);
            tableRow2.Append(sdtCell4);

            sdtContentRow3.Append(tableRow2);

            sdtRow3.Append(sdtProperties20);
            sdtRow3.Append(sdtEndCharProperties20);
            sdtRow3.Append(sdtContentRow3);

            sdtContentRow1.Append(sdtRow2);
            sdtContentRow1.Append(sdtRow3);

            sdtRow1.Append(sdtProperties16);
            sdtRow1.Append(sdtEndCharProperties16);
            sdtRow1.Append(sdtContentRow1);

            TableRow tableRow3 = new TableRow(){ RsidTableRowAddition = "00E930A2", RsidTableRowProperties = "00242789" };

            TableCell tableCell5 = new TableCell();

            TableCellProperties tableCellProperties5 = new TableCellProperties();
            TableCellWidth tableCellWidth5 = new TableCellWidth(){ Width = "4788", Type = TableWidthUnitValues.Dxa };
            Shading shading5 = new Shading(){ Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

            tableCellProperties5.Append(tableCellWidth5);
            tableCellProperties5.Append(shading5);
            Paragraph paragraph16 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidParagraphProperties = "00242789", RsidRunAdditionDefault = "00E930A2" };

            tableCell5.Append(tableCellProperties5);
            tableCell5.Append(paragraph16);

            TableCell tableCell6 = new TableCell();

            TableCellProperties tableCellProperties6 = new TableCellProperties();
            TableCellWidth tableCellWidth6 = new TableCellWidth(){ Width = "4788", Type = TableWidthUnitValues.Dxa };
            Shading shading6 = new Shading(){ Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

            tableCellProperties6.Append(tableCellWidth6);
            tableCellProperties6.Append(shading6);
            Paragraph paragraph17 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidParagraphProperties = "00242789", RsidRunAdditionDefault = "00E930A2" };

            tableCell6.Append(tableCellProperties6);
            tableCell6.Append(paragraph17);

            tableRow3.Append(tableCell5);
            tableRow3.Append(tableCell6);

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(sdtRow1);
            table1.Append(tableRow3);
            Paragraph paragraph18 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidRunAdditionDefault = "00E930A2" };

            SectionProperties sectionProperties1 = new SectionProperties(){ RsidR = "00E930A2" };
            PageSize pageSize1 = new PageSize(){ Width = (UInt32Value)11906U, Height = (UInt32Value)16838U };
            PageMargin pageMargin1 = new PageMargin(){ Top = 1985, Right = (UInt32Value)1701U, Bottom = 1701, Left = (UInt32Value)1701U, Header = (UInt32Value)851U, Footer = (UInt32Value)992U, Gutter = (UInt32Value)0U };
            Columns columns1 = new Columns(){ Space = "425" };
            DocGrid docGrid1 = new DocGrid(){ Type = DocGridValues.Lines, LinePitch = 360 };

            sectionProperties1.Append(pageSize1);
            sectionProperties1.Append(pageMargin1);
            sectionProperties1.Append(columns1);
            sectionProperties1.Append(docGrid1);

            body1.Append(sdtBlock1);
            body1.Append(sdtBlock2);
            body1.Append(sdtBlock3);
            body1.Append(sdtBlock4);
            body1.Append(sdtBlock5);
            body1.Append(sdtBlock6);
            body1.Append(sdtBlock7);
            body1.Append(sdtBlock8);
            body1.Append(sdtBlock10);
            body1.Append(sdtBlock12);
            body1.Append(sdtBlock14);
            body1.Append(table1);
            body1.Append(paragraph18);
            body1.Append(sectionProperties1);

            document1.Append(body1);

            mainDocumentPart1.Document = document1;
        }
Example #2
0
        public static void EditContentControlElements(Stream stream, VerifiableLog log)
        {
            using (WordprocessingDocument package = WordprocessingDocument.Open(stream, true))
            {
                foreach (Tag tag in package.MainDocumentPart.Document.Descendants <Tag>())
                {
                    SdtBlock sdtBlock;
                    W15.SdtRepeatedSection sdtRepeatedSection;

                    switch (tag.Val.Value)
                    {
                    //Tag is "Test1.1.1"
                    //Edit run style(value="PlaceholderText") element is remove
                    case ConstStr.TestTagStrings.TagContent01:
                        sdtBlock = tag.Ancestors <SdtBlock>().First();

                        sdtBlock.SdtContentBlock.Descendants <RunStyle>().Where(e => e.Val == ConstStr.RunStyleValues.Placeholder).First().Remove();
                        sdtBlock.SdtContentBlock.Descendants <Text>().First().Text = ConstStr.TestStrings.ContentControlString2;

                        log.Pass(string.Format("Edit Content Control string and string style of target tag=[{0}], Remove is style(value=\"PlaceholderText\") element.", ConstStr.TestTagStrings.TagContent01));
                        break;

                    //Tag is "Test1.1.2"
                    //Edit run style(value="PlaceholderText") element is append child
                    case ConstStr.TestTagStrings.TagContent02:
                        sdtBlock = tag.Ancestors <SdtBlock>().First();

                        RunStyle runStyle = new RunStyle();
                        runStyle.Val = ConstStr.RunStyleValues.Placeholder;
                        sdtBlock.SdtContentBlock.Descendants <Run>().First().RunProperties.AppendChild <RunStyle>(runStyle);

                        sdtBlock.SdtContentBlock.Descendants <Text>().First().Text = ConstStr.TestStrings.ContentControlString1;

                        log.Pass(string.Format("Edit Content Control string and string style of target tag=[{0}], Remove is style(value=\"PlaceholderText\") element.", ConstStr.TestTagStrings.TagContent02));
                        break;

                    //Tag is "Test1.2.1"
                    //Edit Appearance element in attribute. It's value "Tag"
                    case ConstStr.TestTagStrings.TagContent03:
                        sdtBlock = tag.Ancestors <SdtBlock>().First();

                        if (!sdtBlock.SdtProperties.Descendants <W15.Appearance>().Any())
                        {
                            W15.Appearance appearance = new W15.Appearance();
                            appearance.Val = W15.SdtAppearance.Tags;

                            sdtBlock.SdtProperties.AppendChild <W15.Appearance>(appearance);

                            log.Pass(string.Format("Edit Content Control an appearance element in attribute of target tag=[{0}], Append an appearance element(value=Tga).", ConstStr.TestTagStrings.TagContent03));
                        }
                        else
                        {
                            sdtBlock.SdtProperties.Descendants <W15.Appearance>().First().Val.Value = W15.SdtAppearance.Tags;

                            log.Pass(string.Format("Edit Content Control an appearance element in attribute of target tag=[{0}], Change an appearance attribute(value=Tga).", ConstStr.TestTagStrings.TagContent03));
                        }

                        break;

                    //Tag is "Test1.2.2"
                    //Edit Appearance element in attribute. It's value "Hidden"
                    case ConstStr.TestTagStrings.TagContent04:
                        sdtBlock = tag.Ancestors <SdtBlock>().First();

                        if (!sdtBlock.SdtProperties.Descendants <W15.Appearance>().Any())
                        {
                            W15.Appearance appearance = new W15.Appearance();
                            appearance.Val = W15.SdtAppearance.Hidden;

                            sdtBlock.SdtProperties.AppendChild <W15.Appearance>(appearance);

                            log.Pass(string.Format("Edit Content Control an appearance element in attribute of target tag=[{0}], Append an appearance element(value=Hidden).", ConstStr.TestTagStrings.TagContent04));
                        }
                        else
                        {
                            sdtBlock.SdtProperties.Descendants <W15.Appearance>().First().Val.Value = W15.SdtAppearance.Hidden;

                            log.Pass(string.Format("Edit Content Control an appearance element in attribute of target tag=[{0}], Change an appearance attribute(value=Hidden).", ConstStr.TestTagStrings.TagContent04));
                        }

                        break;

                    //Tag is "Test1.2.3"
                    //Edit Appearance element in attribute. It's value "BoundingBox"
                    case ConstStr.TestTagStrings.TagContent05:
                        sdtBlock = tag.Ancestors <SdtBlock>().First();

                        if (!sdtBlock.SdtProperties.Descendants <W15.Appearance>().Any())
                        {
                            W15.Appearance appearance = new W15.Appearance();
                            appearance.Val = W15.SdtAppearance.BoundingBox;

                            sdtBlock.SdtProperties.AppendChild <W15.Appearance>(appearance);

                            log.Pass(string.Format("Edit Content Control an appearance element in attribute of target tag=[{0}], Append an appearance element(value=BoundingBox).", ConstStr.TestTagStrings.TagContent05));
                        }
                        else
                        {
                            sdtBlock.SdtProperties.Descendants <W15.Appearance>().First().Val.Value = W15.SdtAppearance.BoundingBox;

                            log.Pass(string.Format("Edit Content Control an appearance element in attribute of target tag=[{0}], Change an appearance attribute(value=BoundingBox).", ConstStr.TestTagStrings.TagContent05));
                        }

                        break;

                    //Tag is "Test1.3.1"
                    //Edit Color element. The value of its element, make changes or value added.
                    case ConstStr.TestTagStrings.TagContent06:
                        sdtBlock = tag.Ancestors <SdtBlock>().First();

                        if (!sdtBlock.SdtProperties.Descendants <W15.Color>().Any())
                        {
                            W15.Color color = new W15.Color();
                            color.Val = ConstStr.TestColorValues.TestColor;

                            sdtBlock.SdtProperties.AppendChild <W15.Color>(color);

                            log.Pass(string.Format("Edit Content Control a color element of target tag=[{0}], Append a Color element(value={1}).", ConstStr.TestTagStrings.TagContent06, ConstStr.TestColorValues.TestColor));
                        }
                        else
                        {
                            W15.Color color = sdtBlock.SdtProperties.Descendants <W15.Color>().First();
                            color.Val = ConstStr.TestColorValues.TestColor;

                            log.Pass(string.Format("Edit Content Control a color element of target tag=[{0}], Change a Color element value={1}.", ConstStr.TestTagStrings.TagContent06, ConstStr.TestColorValues.TestColor));
                        }

                        break;

                    //Tag is "Test1.3.2"
                    //Edit Color element. Removes the element.
                    case ConstStr.TestTagStrings.TagContent07:
                        sdtBlock = tag.Ancestors <SdtBlock>().First();

                        if (sdtBlock.SdtProperties.Descendants <W15.Color>().Any())
                        {
                            sdtBlock.SdtProperties.Descendants <W15.Color>().First().Remove();

                            log.Pass(string.Format("Edit Content Control a color element of target tag=[{0}], Removes the element.", ConstStr.TestTagStrings.TagContent07));
                        }
                        else
                        {
                            log.Fail(string.Format("Not found to be edited. Target tag=[{0}].", ConstStr.TestTagStrings.TagContent07));
                        }

                        break;

                    //Tag is "Test1.4.3"
                    //Edit DoNotAllowInsertDeleteSection element. The value of its element, make changes or value added.
                    case ConstStr.TestTagStrings.TagContent10:
                        sdtBlock = tag.Ancestors <SdtBlock>().First();

                        if (sdtBlock.SdtProperties.Descendants <W15.SdtRepeatedSection>().Any())
                        {
                            sdtRepeatedSection = sdtBlock.SdtProperties.Descendants <W15.SdtRepeatedSection>().First();
                            sdtRepeatedSection.DoNotAllowInsertDeleteSection.Val.Value = false;

                            log.Pass(string.Format("Edit Content Control a DoNotAllowInsertDeleteSection element of target tag=[{0}], Change The DoNotAllowInsertDeleteSection element. Its element in attribute value is false.", ConstStr.TestTagStrings.TagContent10));
                        }
                        else
                        {
                            sdtRepeatedSection = new W15.SdtRepeatedSection();
                            sdtRepeatedSection.DoNotAllowInsertDeleteSection.Val.Value = false;
                            sdtBlock.SdtProperties.AppendChild <W15.SdtRepeatedSection>(sdtRepeatedSection);

                            log.Pass(string.Format("Edit Content Control a DoNotAllowInsertDeleteSection element of target tag=[{0}], Append The DoNotAllowInsertDeleteSection element. Its element in attribute value is false.", ConstStr.TestTagStrings.TagContent10));
                        }

                        break;

                    //Tag is "Test1.4.4"
                    //Edit sectionTitle element. The value of its element, make changes or value added.
                    case ConstStr.TestTagStrings.TagContent11:
                        sdtBlock = tag.Ancestors <SdtBlock>().First();

                        var sectionTitles = sdtBlock.Descendants <W15.SectionTitle>();
                        if (sectionTitles.Any())
                        {
                            sectionTitles.First().Val = "TEST_TEST";
                            log.Pass("SectionTitle is detected and updated.");
                        }
                        else
                        {
                            log.Fail("SectionTitle is not found.");
                        }

                        break;
                    }
                }
            }
        }