• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ParagraphProperties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ParagraphProperties的典型用法代码示例。如果您正苦于以下问题:C# ParagraphProperties类的具体用法?C# ParagraphProperties怎么用?C# ParagraphProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ParagraphProperties类属于命名空间,在下文中一共展示了ParagraphProperties类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GenerateParagraph

        public static void GenerateParagraph(this Body body, string text, string styleId)
        {
            var paragraph = new Paragraph
                                {
                                    RsidParagraphAddition = "00CC1B7A",
                                    RsidParagraphProperties = "0016335E",
                                    RsidRunAdditionDefault = "0016335E"
                                };

            var paragraphProperties = new ParagraphProperties();
            var paragraphStyleId = new ParagraphStyleId {Val = styleId};

            paragraphProperties.Append(paragraphStyleId);

            var run1 = new Run();
            var text1 = new Text();
            text1.Text = text;

            run1.Append(text1);

            paragraph.Append(paragraphProperties);
            paragraph.Append(run1);

            body.Append(paragraph);
        }
开发者ID:Jaykul,项目名称:pickles,代码行数:25,代码来源:BodyExtensions.cs


示例2: ApplyFooter

        private void ApplyFooter(FooterPart footerPart)
        {
            var footer1 = new Footer();
            footer1.AddNamespaceDeclaration("ve", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            footer1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            footer1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            footer1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            footer1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            footer1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            footer1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            footer1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            footer1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");

            var paragraph1 = new Paragraph { RsidParagraphAddition = "005641D2", RsidRunAdditionDefault = "005641D2" };

            var paragraphProperties1 = new ParagraphProperties();
            var paragraphStyleId1 = new ParagraphStyleId { Val = "Footer" };

            paragraphProperties1.Append(paragraphStyleId1);

            var run1 = new Run();
            var text1 = new Text();
            text1.Text = "Generated with Pickles " + Assembly.GetExecutingAssembly().GetName().Version;

            run1.Append(text1);

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

            footer1.Append(paragraph1);

            footerPart.Footer = footer1;
        }
开发者ID:vavavivi,项目名称:pickles,代码行数:33,代码来源:WordHeaderFooterFormatter.cs


示例3: GetParagraphProperties

        private static ParagraphProperties GetParagraphProperties(Model.Paragraph paragraph)
        {
            ParagraphProperties paraProps = new ParagraphProperties();

            SpacingBetweenLines paraSpacing = new SpacingBetweenLines()
            {
                Before = Utilities.GetDxaFromPoints(paragraph.SpacingBefore),
                After = Utilities.GetDxaFromPoints(paragraph.SpacingAfter),
                LineRule = LineSpacingRuleValues.Auto,
                //If the value of the lineRule attribute is auto, then the value of the line attribute shall be interpreted as 240ths of a line
                Line = (paragraph.Leading * 240).ToString()
            };

            Justification justification = new Justification();
            switch (paragraph.Justification)
            {
                case DocGen.ObjectModel.Justification.Left:
                    justification.Val = JustificationValues.Left;
                    break;
                case DocGen.ObjectModel.Justification.Center:
                    justification.Val = JustificationValues.Center;
                    break;
                case DocGen.ObjectModel.Justification.Right:
                    justification.Val = JustificationValues.Right;
                    break;
                case DocGen.ObjectModel.Justification.Justified:
                    justification.Val = JustificationValues.Both;
                    break;
            }

            paraProps.Append(justification);
            paraProps.Append(paraSpacing);

            return paraProps;
        }
开发者ID:amilasurendra,项目名称:pdf-generator,代码行数:35,代码来源:ParagraphFormatter.cs


示例4: GetListItem

        /// <summary>
        /// Returns a OpenXMl paragraph representing formatted listItem.
        /// </summary>
        /// <param name="item">listItem object</param>
        /// <param name="numStyleId">style id to use</param>
        /// <returns></returns>
        private static Paragraph GetListItem(Model.ListItem item, int numStyleId)
        {
            Paragraph listItemPara = new Paragraph();

            ParagraphProperties paraProps = new ParagraphProperties();

            NumberingProperties numberingProps = new NumberingProperties();
            NumberingLevelReference numberingLevelReference = new NumberingLevelReference() { Val = 0 };

            NumberingId numberingId = new NumberingId() { Val = numStyleId };

            numberingProps.Append(numberingLevelReference);
            numberingProps.Append(numberingId);
            paraProps.Append(numberingProps);

            Run listRun = new Run();
            Text listItemText = new Text()
            {
                Text = item.Body
            };
            listRun.Append(listItemText);

            listItemPara.Append(paraProps);
            listItemPara.Append(listRun);

            return listItemPara;
        }
开发者ID:amilasurendra,项目名称:pdf-generator,代码行数:33,代码来源:ListFormatter.cs


示例5: ApplyTags

        //____________________________________________________________________
        //
        /// <summary>
        /// Apply all the current Html tag to the specified table cell.
        /// </summary>
        public override void ApplyTags(OpenXmlCompositeElement tableCell)
        {
            if (tags.Count > 0)
            {
                TableCellProperties properties = tableCell.GetFirstChild<TableCellProperties>();
                if (properties == null) tableCell.PrependChild<TableCellProperties>(properties = new TableCellProperties());

                var en = tags.GetEnumerator();
                while (en.MoveNext())
                {
                    TagsAtSameLevel tagsOfSameLevel = en.Current.Value.Peek();
                    foreach (OpenXmlElement tag in tagsOfSameLevel.Array)
                        properties.Append(tag.CloneNode(true));
                }
            }

            // Apply some style attributes on the unique Paragraph tag contained inside a table cell.
            if (tagsParagraph.Count > 0)
            {
                Paragraph p = tableCell.GetFirstChild<Paragraph>();
                ParagraphProperties properties = p.GetFirstChild<ParagraphProperties>();
                if (properties == null) p.PrependChild<ParagraphProperties>(properties = new ParagraphProperties());

                var en = tagsParagraph.GetEnumerator();
                while (en.MoveNext())
                {
                    TagsAtSameLevel tagsOfSameLevel = en.Current.Value.Peek();
                    foreach (OpenXmlElement tag in tagsOfSameLevel.Array)
                        properties.Append(tag.CloneNode(true));
                }
            }
        }
开发者ID:TimNFL,项目名称:PEACReportsDemo,代码行数:37,代码来源:TableStyleCollection.cs


示例6: ApplyStyle

 public static Paragraph ApplyStyle(this Paragraph paragrah, string style)
 {
     ParagraphProperties properties = new ParagraphProperties();
     properties.ParagraphStyleId = new ParagraphStyleId() { Val = style };
     paragrah.Append(properties);
     return paragrah;
 }
开发者ID:IdeaFortune,项目名称:DocumentGenerator,代码行数:7,代码来源:ParagraphExtensions.cs


示例7: OXMLParagraphFormatWrap

        public OXMLParagraphFormatWrap(Paragraph paragraph)
        {
            if (paragraph.ParagraphProperties == null)
                paragraph.ParagraphProperties = new ParagraphProperties();

            pPr = paragraph.ParagraphProperties;
            if (pPr.Justification == null)
                pPr.Justification = new Justification() { Val = JustificationValues.Left };
        }
开发者ID:VLunev,项目名称:RachetRR4,代码行数:9,代码来源:OXMLParagraphFormatWrap.cs


示例8: Test_Style_01

        public static void Test_Style_01()
        {
            SetDirectory();
            string file = "test_Style_01.docx";
            Trace.WriteLine("create docx \"{0}\" using OXmlDoc", file);

            using (WordprocessingDocument doc = WordprocessingDocument.Create(zPath.Combine(_directory, file), WordprocessingDocumentType.Document))
            {
                MainDocumentPart mainPart = doc.AddMainDocumentPart();

                mainPart.Document = new Document();
                Body body = mainPart.Document.AppendChild(new Body());

                //body.AppendChild(Test_OXmlCreator.CreateSectionProperties());
                SectionProperties sectionProperties = body.AppendChild(new SectionProperties());
                Test_OpenXml_Creator.SetSectionPage(sectionProperties);

                //SectionProperties sectionProperties = new SectionProperties();
                //// PageSize, <w:pgSz w:w="11907" w:h="16839"/>, 11907 1/20 point = 21 cm, 16839 1/20 point = 29.7 cm, unit = 1/20 point, 11907 1/20 point = 595.35 point
                //sectionProperties.AppendChild(new PageSize { Width = 11907, Height = 16839 });
                //// top 1.27 cm, bottom 1.27 cm, left 2.5 cm, right 2.5 cm, header 0.5 cm, footer 0.5 cm
                //// <w:pgMar w:top="720" w:right="1418" w:bottom="720" w:left="1418" w:header="284" w:footer="284" w:gutter="0"/>
                //sectionProperties.AppendChild(new PageMargin { Top = 720, Bottom = 720, Left = 1418, Right = 1418, Header = 284, Footer = 284 });
                //body.AppendChild(sectionProperties);

                //Trace.WriteLine("add StyleDefinitionsPart");
                Styles styles = Test_OpenXml_Creator.CreateStyles(mainPart);

                //Trace.WriteLine("create DocDefaults");
                styles.DocDefaults = Test_OpenXml_Creator.CreateDocDefaults();
                //string tinyParagraphStyleId = Test_OXmlCreator.CreateStyleTinyParagraph(styles);
                string tinyParagraphStyleId = "TinyParagraph";
                styles.Append(Test_OpenXml_Creator.CreateTinyParagraphStyle(tinyParagraphStyleId));

                //string styleAliases = "style_01";
                //Trace.WriteLine($"create style {styleId}");


                //Paragraph paragraph = body.AppendChild(new Paragraph());
                //Run run = paragraph.AppendChild(new Run());
                //run.RunProperties = new RunProperties(new RunFonts() { Ascii = "Arial" });

                //RunProperties runProperties = new RunProperties(new RunFonts() { Ascii = "Arial" });
                //Run r = package.MainDocumentPart.Document.Descendants<Run>().First();
                //r.PrependChild<RunProperties>(rPr);

                ParagraphProperties paragraphProperties = new ParagraphProperties();
                // ParagraphStyleId, <w:pStyle>
                paragraphProperties.ParagraphStyleId = new ParagraphStyleId { Val = tinyParagraphStyleId };

                //AddText(body);
                //AddText(body, paragraphProperties);
                body.Append(Test_OpenXml_Creator.CreateText_01(paragraphProperties));
            }
        }
开发者ID:labeuze,项目名称:source,代码行数:55,代码来源:Test_OpenXml_Style.cs


示例9: GenerateParagraph

 /// <summary>
 /// создание параграфа
 /// </summary>
 /// <param name="text">null = пустая строка</param>
 /// <param name="parProp">null = настройки из стиля</param>
 /// <returns></returns>
 public void GenerateParagraph(Run run = null, ParagraphProperties parProp = null)
 {
     var paragraph = new Paragraph();
     parProp = parProp ?? GetParagraphProperties();
     paragraph.Append(parProp);
     if (run != null)
     {
         paragraph.Append(run);
     }
     _body.Append(paragraph);
 }
开发者ID:silmarion,项目名称:WPDHelper,代码行数:17,代码来源:DocBuilderHelpers.cs


示例10: ToOpenXmlElements

        public override IEnumerable<OpenXmlElement> ToOpenXmlElements(DocumentFormat.OpenXml.Packaging.MainDocumentPart mainDocumentPart)
        {
            var result = new DocumentFormat.OpenXml.Wordprocessing.Paragraph();

            var paragraphProperties = new ParagraphProperties();

            var numberingProperties = new NumberingProperties();
            var numberingLevelReference = new NumberingLevelReference() { Val = 0 };

            NumberingId numberingId;
            ParagraphStyleId paragraphStyleId;
            if (Parent is OrderedListFormattedElement)
            {
                paragraphStyleId = new ParagraphStyleId() { Val = "NumberedList" };
                numberingId = new NumberingId() { Val = ((OrderedListFormattedElement)Parent).NumberingInstanceId };

                var indentation = new Indentation() { Left = "1440", Hanging = "720" };
                paragraphProperties.Append(indentation);
            }
            else
            {
                paragraphStyleId = new ParagraphStyleId() { Val = "UnorderedListStyle" };
                numberingId = new NumberingId() { Val = 3 };
            }

            numberingProperties.Append(numberingLevelReference);
            numberingProperties.Append(numberingId);

            var spacingBetweenLines= new SpacingBetweenLines() { After = "100", AfterAutoSpacing = true };

            paragraphProperties.Append(paragraphStyleId);
            paragraphProperties.Append(numberingProperties);
            paragraphProperties.Append(spacingBetweenLines);
            result.Append(paragraphProperties);

            ForEachChild(x =>
            {
                if (x is TextFormattedElement)
                {
                    result.Append(
                        new DocumentFormat.OpenXml.Wordprocessing.Run(x.ToOpenXmlElements(mainDocumentPart))
                    );

                }
                else
                {
                    result.Append(x.ToOpenXmlElements(mainDocumentPart));
                }
            });

            return new List<OpenXmlElement> { result };
        }
开发者ID:julienblin,项目名称:RadarPOC,代码行数:52,代码来源:ListItemFormattedElement.cs


示例11: IsSectionProps

        static bool IsSectionProps(ParagraphProperties pPr)
        {

            SectionProperties sectPr = pPr.GetFirstChild<SectionProperties>();

            if (sectPr == null)

                return false;

            else

                return true;

        }
开发者ID:aspose-words,项目名称:Aspose.Words-for-.NET,代码行数:14,代码来源:Program.cs


示例12: SetListProperties

        private void SetListProperties(NumberFormatValues numberFormat, ParagraphProperties paragraphProperties)
        {
            ParagraphStyleId paragraphStyleId = new ParagraphStyleId() { Val = "ListParagraph" };

            NumberingProperties numberingProperties = new NumberingProperties();
            NumberingLevelReference numberingLevelReference = new NumberingLevelReference() { Val = 0 };
            NumberingId numberingId = new NumberingId() { Val = ((Int32)numberFormat) + 1 };

            numberingProperties.Append(numberingLevelReference);
            numberingProperties.Append(numberingId);

            paragraphProperties.Append(paragraphStyleId);
            paragraphProperties.Append(numberingProperties);
        }
开发者ID:kannan-ar,项目名称:MariGold.OpenXHTML,代码行数:14,代码来源:DocxOL.cs


示例13: CreateCodeParagraph

        private Paragraph CreateCodeParagraph(CodeVM code)
        {
            Paragraph paragraph1 = new Paragraph();

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            Indentation indentation1 = new Indentation(){ FirstLine = "210", FirstLineChars = 100 };

            paragraphProperties1.Append(indentation1);

            Run run1 = new Run();

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

            runProperties1.Append(runFonts1);
            Text text1 = new Text();
            text1.Text = code.Value;
            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run();

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

            runProperties2.Append(runFonts2);
            TabChar tabChar1 = new TabChar();

            run2.Append(runProperties2);
            run2.Append(tabChar1);

            Run run3 = new Run();

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

            runProperties3.Append(runFonts3);
            Text text2 = new Text();
            text2.Text = code.Label;

            run3.Append(runProperties3);
            run3.Append(text2);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            paragraph1.Append(run2);
            paragraph1.Append(run3);
            return paragraph1;
        }
开发者ID:Easy-DDI-Organizer,项目名称:EDO,代码行数:49,代码来源:CodebookWriter.cs


示例14: ApplyTags

        /// <summary>
        /// Apply all the current Html tag (Paragraph properties) to the specified paragrah.
        /// </summary>
        public override void ApplyTags(OpenXmlCompositeElement paragraph)
        {
            if (tags.Count == 0) return;

            ParagraphProperties properties = paragraph.GetFirstChild<ParagraphProperties>();
            if (properties == null) paragraph.PrependChild<ParagraphProperties>(properties = new ParagraphProperties());

            var en = tags.GetEnumerator();
            while (en.MoveNext())
            {
                TagsAtSameLevel tagsOfSameLevel = en.Current.Value.Peek();
                foreach (OpenXmlElement tag in tagsOfSameLevel.Array)
                    properties.Append(tag.CloneNode(true));
            }
        }
开发者ID:TimNFL,项目名称:PEACReportsDemo,代码行数:18,代码来源:ParagraphStyleCollection.cs


示例15: AddAlphaRow

        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;
        }
开发者ID:stevesloka,项目名称:bvcms,代码行数:46,代码来源:CompactRow.cs


示例16: ProcessBorder

		private void ProcessBorder(DocxNode node, ParagraphProperties properties)
		{
			ParagraphBorders paragraphBorders = new ParagraphBorders();
			
			DocxBorder.ApplyBorders(paragraphBorders,
				node.ExtractStyleValue(DocxBorder.borderName),
				node.ExtractStyleValue(DocxBorder.leftBorderName),
				node.ExtractStyleValue(DocxBorder.topBorderName),
				node.ExtractStyleValue(DocxBorder.rightBorderName),
				node.ExtractStyleValue(DocxBorder.bottomBorderName),
				false);
			
			if (paragraphBorders.HasChildren)
			{
				properties.Append(paragraphBorders);
			}
		}
开发者ID:kannan-ar,项目名称:MariGold.OpenXHTML,代码行数:17,代码来源:DocxParagraphStyle.cs


示例17: AddHeaderRow

        private static void AddHeaderRow(DataTable table, Table wordTable, TableStyle tableStyle)
        {
            // Create a row.
            TableRow tRow = new TableRow();

            foreach (DataColumn iColumn in table.Columns) {

                // Create a cell.
                TableCell tCell = new TableCell();

                TableCellProperties tCellProperties = new TableCellProperties();

                // Set Cell Color
                Shading tCellColor = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = System.Drawing.ColorTranslator.ToHtml(tableStyle.HeaderBackgroundColor) };
                tCellProperties.Append(tCellColor);

                // Append properties to the cell
                tCell.Append(tCellProperties);

                ParagraphProperties paragProperties = new ParagraphProperties();
                Justification justification1 = new Justification() { Val = JustificationValues.Center };
                SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0" };
                paragProperties.Append(spacingBetweenLines1);
                paragProperties.Append(justification1);

                var parag = new Paragraph();
                parag.Append(paragProperties);

                var run = new Run(new Text(iColumn.ColumnName));
                ApplyFontProperties(tableStyle, RowIdentification.Header, run);
                parag.Append(run);

                // Specify the table cell content.
                tCell.Append(parag);

                // Append the table cell to the table row.
                tRow.Append(tCell);
            }

            // Append the table row to the table.
            wordTable.Append(tRow);
        }
开发者ID:FerHenrique,项目名称:Owl,代码行数:42,代码来源:TableCreator.cs


示例18: GenerateHeaderPartContent

        public static void GenerateHeaderPartContent(HeaderPart part)
        {
            Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
            header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" };

            paragraphProperties1.Append(paragraphStyleId1);

            Run run1 = new Run();
            Text text1 = new Text();
            text1.Text = "Header";

            run1.Append(text1);

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

            header1.Append(paragraph1);

            part.Header = header1;
        }
开发者ID:aspose-words,项目名称:Aspose.Words-for-.NET,代码行数:39,代码来源:Program.cs


示例19: AddSpacerCell

		// Creates an TableCell instance and adds its children.
		public static void AddSpacerCell(this TableRow row, string width = "173")
		{
			TableCell tableCell1 = new TableCell();

			TableCellProperties tableCellProperties1 = new TableCellProperties();
			TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = width, Type = TableWidthUnitValues.Dxa };

			tableCellProperties1.Append(tableCellWidth1);

			Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" };

			ParagraphProperties paragraphProperties1 = new ParagraphProperties();
			Indentation indentation1 = new Indentation() { Left = "95", Right = "95" };

			paragraphProperties1.Append(indentation1);

			paragraph1.Append(paragraphProperties1);

			tableCell1.Append(tableCellProperties1);
			tableCell1.Append(paragraph1);
			row.Append(tableCell1);
		}
开发者ID:stevesloka,项目名称:bvcms,代码行数:23,代码来源:AverySpacerCell173.cs


示例20: GenerateChapterEight

        private void GenerateChapterEight()
        {
            var paraProp = new ParagraphProperties();
            var paragraph = new Paragraph();
            var runProp = new RunProperties();
            var run = new Run();

            var chapterEight = _sessionObjects.ChapterEight;
            run.Append(new Text(chapterEight.Header));
            paraProp = GetParagraphProperties("Header1");
            GenerateParagraph(run, paraProp);

            for (var i = 0; i < chapterEight.Provision.Rows.Count; i++)
            {
                paraProp = GetParagraphProperties("StyleWithoutIndentation");
                run = new Run();
                var str = String.Format("{0}. {1}", i, chapterEight.Provision.Rows[i]["Text"].ToString());
                run.Append(new Text(str));
                GenerateParagraph(run, paraProp);
            }
            GenerateParagraph();
        }
开发者ID:silmarion,项目名称:WPDHelper,代码行数:22,代码来源:DocBuilder.cs



注:本文中的ParagraphProperties类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ParallelForTest类代码示例发布时间:2022-05-24
下一篇:
C# ParagraphComment类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap