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

C# RunProperties类代码示例

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

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



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

示例1: Process

        internal void Process(Run element, DocxNode node)
		{
			RunProperties properties = element.RunProperties;
			
			if (properties == null)
			{
				properties = new RunProperties();
			}
			
			//Order of assigning styles to run property is important. The order should not change.
            CheckFonts(node, properties);

            string color = node.ExtractStyleValue(DocxColor.color);
			
			if (!string.IsNullOrEmpty(color))
			{
				DocxColor.ApplyColor(color, properties);
			}

            CheckFontStyle(node, properties);

            ProcessBackGround(node, properties);

            ProcessVerticalAlign(node, properties);

			if (element.RunProperties == null && properties.HasChildren)
			{
				element.RunProperties = properties;
			}
		}
开发者ID:kannan-ar,项目名称:MariGold.OpenXHTML,代码行数:30,代码来源:DocxRunStyle.cs


示例2: GenerateRun

 protected Run GenerateRun(RunProperties runProperties, string text)
 {
     SetFontRunProperties(runProperties);
     var run = new Run() { RunProperties = runProperties };
     run.AppendChild(new Text(text));
     return run;
 }
开发者ID:kateEvstratenko,项目名称:Bank,代码行数:7,代码来源:BaseDocService.cs


示例3: ProcessVerticalAlign

        private void ProcessVerticalAlign(DocxNode node, RunProperties properties)
        {
            string verticalAlign = node.ExtractStyleValue(DocxAlignment.verticalAlign);

            if(!string.IsNullOrEmpty(verticalAlign))
            {
                DocxAlignment.ApplyVerticalTextAlign(verticalAlign, properties);
            }
        }
开发者ID:kannan-ar,项目名称:MariGold.OpenXHTML,代码行数:9,代码来源:DocxRunStyle.cs


示例4: SetFontRunProperties

 protected void SetFontRunProperties(RunProperties runProperties)
 {
     runProperties.RunFonts = new RunFonts()
     {
         Ascii = "Times New Roman"
     };
     runProperties.FontSize = new FontSize()
     {
         Val = "24"
     };
 }
开发者ID:kateEvstratenko,项目名称:Bank,代码行数:11,代码来源:BaseDocService.cs


示例5: ProcessBackGround

        private void ProcessBackGround(DocxNode node, RunProperties properties)
        {
            string backgroundColor = node.ExtractStyleValue(DocxColor.backGroundColor);
            string backGround = DocxColor.ExtractBackGround(node.ExtractStyleValue(DocxColor.backGround));

            if (!string.IsNullOrEmpty(backgroundColor))
            {
                DocxColor.ApplyBackGroundColor(backgroundColor, properties);
            }
            else if (!string.IsNullOrEmpty(backGround))
            {
                DocxColor.ApplyBackGroundColor(backGround, properties);
            }
        }
开发者ID:kannan-ar,项目名称:MariGold.OpenXHTML,代码行数:14,代码来源:DocxRunStyle.cs


示例6: AddParagraph

        protected void AddParagraph(Body body, JustificationValues justification, RunProperties runProperties, string text)
        {
            SetFontRunProperties(runProperties);
            var paragraph = body.AppendChild(new Paragraph()
            {
                ParagraphProperties = new ParagraphProperties()
                {
                    Justification = new Justification() { Val = justification }
                }
            });

            var run = paragraph.AppendChild(new Run() { RunProperties = runProperties });
            run.AppendChild(new Text(text));
        }
开发者ID:kateEvstratenko,项目名称:Bank,代码行数:14,代码来源:BaseDocService.cs


示例7: 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


示例8: CheckFontStyle

        private void CheckFontStyle(DocxNode node, RunProperties properties)
		{
            string fontSize = node.ExtractStyleValue(DocxFontStyle.fontSize);
            string textDecoration = node.ExtractStyleValue(DocxFontStyle.textDecoration);
			
			if (!string.IsNullOrEmpty(fontSize))
			{
				DocxFontStyle.ApplyFontSize(fontSize, properties);
			}
			
			if (!string.IsNullOrEmpty(textDecoration))
			{
				DocxFontStyle.ApplyTextDecoration(textDecoration, properties);
			}
		}
开发者ID:kannan-ar,项目名称:MariGold.OpenXHTML,代码行数:15,代码来源:DocxRunStyle.cs


示例9: 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


示例10: ApplyTags

        /// <summary>
        /// Apply all the current Html tag (Run properties) to the specified run.
        /// </summary>
        public override void ApplyTags(OpenXmlCompositeElement run)
        {
            if (tags.Count == 0 && DefaultRunStyle == null) return;

            RunProperties properties = run.GetFirstChild<RunProperties>();
            if (properties == null) run.PrependChild<RunProperties>(properties = new RunProperties());

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

            if (this.DefaultRunStyle != null)
                properties.Append(new RunStyle() { Val = this.DefaultRunStyle });
        }
开发者ID:TimNFL,项目名称:PEACReportsDemo,代码行数:21,代码来源:RunStyleCollection.cs


示例11: ApplyStyle

        public static StyleDefinitionsPart ApplyStyle(this StyleDefinitionsPart part, IStyle mystyle)
        {
            var pRp = new RunProperties();
            var color = new Color()
            {
                Val = mystyle.Color
            };
            var fonts = new RunFonts
            {
                Ascii = mystyle.FontName
            };
            pRp.Append(color);
            pRp.Append(fonts);

            if (mystyle.Bold)
            {
                pRp.Append(new Bold());
            }

            pRp.Append(new FontSize()
            {
                Val = mystyle.FontSize.ToString()
            });

            var style = new Style { StyleId = mystyle.Id };
            style.Append(new Name() { Val = mystyle.Name });
            style.Append(new BasedOn() { Val = mystyle.BasedOn });
            style.Append(new NextParagraphStyle() { Val = "Normal" });

            style.Append(pRp);

            if (part.Styles == null)
            {
                part.Styles = new Styles();
            }

            part.Styles.Append(style);
            part.Styles.Save();

            return part;
        }
开发者ID:IdeaFortune,项目名称:DocumentGenerator,代码行数:41,代码来源:StyleHelpers.cs


示例12: CheckFonts

		private void CheckFonts(DocxNode node, RunProperties properties)
		{
            string fontFamily = node.ExtractStyleValue(DocxFontStyle.fontFamily);
            string fontWeight = node.ExtractStyleValue(DocxFontStyle.fontWeight);
            string fontStyle = node.ExtractStyleValue(DocxFontStyle.fontStyle);
			
			if (!string.IsNullOrEmpty(fontFamily))
			{
				DocxFontStyle.ApplyFontFamily(fontFamily, properties);
			}
			
			if (!string.IsNullOrEmpty(fontWeight))
			{
				DocxFontStyle.ApplyFontWeight(fontWeight, properties);
			}
				
			if (!string.IsNullOrEmpty(fontStyle))
			{
				DocxFontStyle.ApplyFontStyle(fontStyle, properties);
			}
		}
开发者ID:kannan-ar,项目名称:MariGold.OpenXHTML,代码行数:21,代码来源:DocxRunStyle.cs


示例13: 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


示例14: CreateTextContent

 protected static IEnumerable<Run> CreateTextContent(IEnumerable<string> content, RunProperties runProperties = null)
 {
     return content
         .SelectMany(x => x.Split(new[] {Environment.NewLine}, StringSplitOptions.None))
         .SelectMany((contentLine, index) => index == 0
                                                 ? new[]
                                                   	{
                                                   		new Run(new Text(contentLine) {Space = SpaceProcessingModeValues.Preserve})
                                                   			{
                                                   				RunProperties = CloneRunPropertiesIfNotNull(runProperties)
                                                   			}
                                                   	}
                                                 : new[]
                                                   	{
                                                   		new Run(new Break()) {RunProperties = CloneRunPropertiesIfNotNull(runProperties)},
                                                   		new Run(new Text(contentLine) {Space = SpaceProcessingModeValues.Preserve})
                                                   			{
                                                   				RunProperties = CloneRunPropertiesIfNotNull(runProperties)
                                                   			}
                                                   	})
         .ToList();
 }
开发者ID:AlexanderByndyu,项目名称:TabulaRasa,代码行数:22,代码来源:DocxDocumentBuilderBase.cs


示例15: CreateRun

        private static RunProperties CreateRun(Model.Text text)
        {
            RunProperties runProperties = new RunProperties();
            if (text.Font == null) return null;

            FontSize size = new FontSize()
            {
                Val = Utilities.GetHPSValue(text.Font.Size)
            };

            runProperties.Append(size);

            foreach (var format in text.Font.Formats)
            {
                switch (format)
                {
                    case Model.FontFormats.Bold: runProperties.Append(new Bold()); break;
                    case Model.FontFormats.Italic: runProperties.Append(new Italic()); break;
                    case Model.FontFormats.Underlined: runProperties.Append(new Underline() { Val = UnderlineValues.Single}); break;
                }
            }

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


示例16: GenerateMainDocumentPart1Content

        // 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();
//.........这里部分代码省略.........
开发者ID:eriawan,项目名称:Open-XML-SDK,代码行数:101,代码来源:GeneratedDocument.cs


示例17: GenerateGlossaryDocumentPart1Content

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

            DocParts docParts1 = new DocParts();

            DocPart docPart1 = new DocPart();

            DocPartProperties docPartProperties1 = new DocPartProperties();
            DocPartName docPartName1 = new DocPartName(){ Val = "DefaultPlaceholder_1081868558" };

            Category category1 = new Category();
            Name name1 = new Name(){ Val = "General" };
            Gallery gallery1 = new Gallery(){ Val = DocPartGalleryValues.Placeholder };

            category1.Append(name1);
            category1.Append(gallery1);

            DocPartTypes docPartTypes1 = new DocPartTypes();
            DocPartType docPartType1 = new DocPartType(){ Val = DocPartValues.SdtPlaceholder };

            docPartTypes1.Append(docPartType1);

            Behaviors behaviors1 = new Behaviors();
            Behavior behavior1 = new Behavior(){ Val = DocPartBehaviorValues.Content };

            behaviors1.Append(behavior1);
            DocPartId docPartId1 = new DocPartId(){ Val = "{F039DA22-FC7F-4FBD-92C2-651CCBF1B274}" };

            docPartProperties1.Append(docPartName1);
            docPartProperties1.Append(category1);
            docPartProperties1.Append(docPartTypes1);
            docPartProperties1.Append(behaviors1);
            docPartProperties1.Append(docPartId1);

            DocPartBody docPartBody1 = new DocPartBody();

            Paragraph paragraph19 = new Paragraph(){ RsidParagraphAddition = "00930812", RsidRunAdditionDefault = "00B75576" };

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

            RunProperties runProperties43 = new RunProperties();
            RunStyle runStyle3 = new RunStyle(){ Val = "PlaceholderText" };

            runProperties43.Append(runStyle3);
            Text text25 = new Text();
            text25.Text = "Click here to enter text.";

            run25.Append(runProperties43);
            run25.Append(text25);

            paragraph19.Append(run25);

            docPartBody1.Append(paragraph19);

            docPart1.Append(docPartProperties1);
            docPart1.Append(docPartBody1);

            DocPart docPart2 = new DocPart();

            DocPartProperties docPartProperties2 = new DocPartProperties();
            DocPartName docPartName2 = new DocPartName(){ Val = "DefaultPlaceholder_1081868562" };

            Category category2 = new Category();
            Name name2 = new Name(){ Val = "General" };
            Gallery gallery2 = new Gallery(){ Val = DocPartGalleryValues.Placeholder };

            category2.Append(name2);
            category2.Append(gallery2);

            DocPartTypes docPartTypes2 = new DocPartTypes();
            DocPartType docPartType2 = new DocPartType(){ Val = DocPartValues.SdtPlaceholder };

            docPartTypes2.Append(docPartType2);

            Behaviors behaviors2 = new Behaviors();
            Behavior behavior2 = new Behavior(){ Val = DocPartBehaviorValues.Content };

            behaviors2.Append(behavior2);
            DocPartId docPartId2 = new DocPartId(){ Val = "{00F3F2EC-0290-443B-9815-66648EE1ADF9}" };

            docPartProperties2.Append(docPartName2);
            docPartProperties2.Append(category2);
//.........这里部分代码省略.........
开发者ID:eriawan,项目名称:Open-XML-SDK,代码行数:101,代码来源:GeneratedDocument.cs


示例18: GenerateMainDocumentPart1Content

        // 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/2012/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();

            Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "002C2DE6", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" };

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

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            RunFonts runFonts1 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
            Bold bold1 = new Bold();
            FontSize fontSize1 = new FontSize() { Val = "30" };

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

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

            Run run1 = new Run() { RsidRunProperties = "00417926" };

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts2 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
            Bold bold2 = new Bold();
            FontSize fontSize2 = new FontSize() { Val = "30" };

            runProperties1.Append(runFonts2);
            runProperties1.Append(bold2);
            runProperties1.Append(fontSize2);
            Text text1 = new Text();
            text1.Text = "Hard To Find Books";

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

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

            Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "0" };
            Justification justification2 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            RunFonts runFonts3 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
            Bold bold3 = new Bold();
            FontSize fontSize3 = new FontSize() { Val = "30" };

            paragraphMarkRunProperties2.Append(runFonts3);
            paragraphMarkRunProperties2.Append(bold3);
            paragraphMarkRunProperties2.Append(fontSize3);

            paragraphProperties2.Append(spacingBetweenLines2);
            paragraphProperties2.Append(justification2);
            paragraphProperties2.Append(paragraphMarkRunProperties2);

            Run run2 = new Run() { RsidRunProperties = "00417926" };

            RunProperties runProperties2 = new RunProperties();
            RunFonts runFonts4 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
            Bold bold4 = new Bold();
            FontSize fontSize4 = new FontSize() { Val = "30" };

            runProperties2.Append(runFonts4);
            runProperties2.Append(bold4);
            runProperties2.Append(fontSize4);
            Text text2 = new Text();
            text2.Text = "Internet NZ Ltd.";

            run2.Append(runProperties2);
            run2.Append(text2);

            paragraph2.Append(paragraphProperties2);
            paragraph2.Append(run2);

            Paragraph paragraph3 = new Paragraph() { RsidParagraphMarkRevision = "00417926", RsidParagraphAddition = "00417926", RsidParagraphProperties = "00417926", RsidRunAdditionDefault = "00417926" };
//.........这里部分代码省略.........
开发者ID:CGHill,项目名称:Hard-To-Find,代码行数:101,代码来源:InvoiceCreator.cs


示例19: CreateTextParagraph

        private Paragraph CreateTextParagraph(string str)
        {
            Paragraph paragraph = new Paragraph() {};

            Run run = new Run();
            RunProperties runProperties = new RunProperties();
            RunFonts runFonts = new RunFonts() { Hint = FontTypeHintValues.EastAsia };

            runProperties.Append(runFonts);
            Text text = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text.Text = str;

            run.Append(runProperties);
            run.Append(text);

            paragraph.Append(run);
            return paragraph;
        }
开发者ID:Easy-DDI-Organizer,项目名称:EDO,代码行数:18,代码来源:QuestionnaireWriter.cs


示例20: CreateCenterParagraph

 private Paragraph CreateCenterParagraph(string str)
 {
     Paragraph paragraph = new Paragraph();
     ParagraphProperties paragraphProperties = new ParagraphProperties();
     paragraph.Append(paragraphProperties);
     paragraphProperties.Append(new Justification() { Val = JustificationValues.Center });
     Run run = new Run();
     RunProperties runProperties = new RunProperties();
     RunFonts runFonts = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
     runProperties.Append(runFonts);
     Text text = new Text() { Space = SpaceProcessingModeValues.Preserve };
     text.Text = str;
     run.Append(runProperties);
     run.Append(text);
     paragraph.Append(run);
     return paragraph;
 }
开发者ID:Easy-DDI-Organizer,项目名称:EDO,代码行数:17,代码来源:QuestionnaireWriter.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# RunState类代码示例发布时间:2022-05-24
下一篇:
C# RunMode类代码示例发布时间: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