Exemple #1
0
        public Paragraph AddAlphaRow()
        {
            var paragraph1 = new Paragraph {
                RsidParagraphMarkRevision = "005205ED", RsidParagraphAddition = "00A01149", RsidParagraphProperties = "005205ED", RsidRunAdditionDefault = "00E7001C"
            };

            var paragraphProperties1 = new ParagraphProperties();
            var spacingBetweenLines1 = new SpacingBetweenLines {
                After = "60", Line = "240", LineRule = LineSpacingRuleValues.Auto
            };
            var justification1 = new Justification {
                Val = JustificationValues.Center
            };

            var paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            var runFonts1 = new RunFonts {
                ComplexScriptTheme = ThemeFontValues.MinorHighAnsi
            };
            var bold1     = new Bold();
            var fontSize1 = new FontSize {
                Val = "32"
            };
            var fontSizeComplexScript1 = new FontSizeComplexScript {
                Val = "32"
            };

            paragraphMarkRunProperties1.Append(runFonts1);
            paragraphMarkRunProperties1.Append(bold1);
            paragraphMarkRunProperties1.Append(fontSize1);
            paragraphMarkRunProperties1.Append(fontSizeComplexScript1);

            paragraphProperties1.Append(new KeepNext());
            paragraphProperties1.Append(spacingBetweenLines1);
            paragraphProperties1.Append(justification1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            var run1 = new Run {
                RsidRunProperties = "005205ED"
            };

            var runProperties1 = new RunProperties();
            var runFonts2      = new RunFonts {
                ComplexScriptTheme = ThemeFontValues.MinorHighAnsi
            };
            var bold2     = new Bold();
            var fontSize2 = new FontSize {
                Val = "32"
            };
            var fontSizeComplexScript2 = new FontSizeComplexScript {
                Val = "32"
            };

            runProperties1.Append(runFonts2);
            runProperties1.Append(bold2);
            runProperties1.Append(fontSize2);
            runProperties1.Append(fontSizeComplexScript2);
            var text1 = new Text();

            text1.Text = FamilyName.Substring(0, 1);

            run1.Append(runProperties1);
            run1.Append(text1);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            return(paragraph1);
        }