本文整理汇总了C#中Header.AddNamespaceDeclaration方法的典型用法代码示例。如果您正苦于以下问题:C# Header.AddNamespaceDeclaration方法的具体用法?C# Header.AddNamespaceDeclaration怎么用?C# Header.AddNamespaceDeclaration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Header
的用法示例。
在下文中一共展示了Header.AddNamespaceDeclaration方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyHeader
private void ApplyHeader(HeaderPart headerPart)
{
var header1 = new Header();
header1.AddNamespaceDeclaration("ve", "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("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("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 = "Header"};
paragraphProperties1.Append(paragraphStyleId1);
var run1 = new Run();
var text1 = new Text();
if (!string.IsNullOrEmpty(this.configuration.SystemUnderTestName) &&
!string.IsNullOrEmpty(this.configuration.SystemUnderTestVersion))
{
text1.Text = string.Format("{0}, version {1}", this.configuration.SystemUnderTestName,
this.configuration.SystemUnderTestVersion);
}
else if (!string.IsNullOrEmpty(this.configuration.SystemUnderTestName))
{
text1.Text = this.configuration.SystemUnderTestName;
}
else if (!string.IsNullOrEmpty(this.configuration.SystemUnderTestVersion))
{
text1.Text = string.Format("Features for version {0}", this.configuration.SystemUnderTestVersion);
}
run1.Append(text1);
paragraph1.Append(paragraphProperties1);
paragraph1.Append(run1);
var paragraph2 = new Paragraph {RsidParagraphAddition = "005641D2", RsidRunAdditionDefault = "005641D2"};
var paragraphProperties2 = new ParagraphProperties();
var paragraphStyleId2 = new ParagraphStyleId {Val = "Header"};
paragraphProperties2.Append(paragraphStyleId2);
paragraph2.Append(paragraphProperties2);
header1.Append(paragraph1);
header1.Append(paragraph2);
headerPart.Header = header1;
}
示例2: 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;
}
示例3: GenerateHeaderPart1Content
// Generates content of headerPart1.
private void GenerateHeaderPart1Content(HeaderPart headerPart1)
{
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 paragraph52 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" };
ParagraphProperties paragraphProperties50 = new ParagraphProperties();
WidowControl widowControl50 = new WidowControl() { Val = false };
AutoSpaceDE autoSpaceDE50 = new AutoSpaceDE() { Val = false };
AutoSpaceDN autoSpaceDN50 = new AutoSpaceDN() { Val = false };
AdjustRightIndent adjustRightIndent50 = new AdjustRightIndent() { Val = false };
SpacingBetweenLines spacingBetweenLines36 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
Justification justification11 = new Justification() { Val = JustificationValues.Center };
ParagraphMarkRunProperties paragraphMarkRunProperties50 = new ParagraphMarkRunProperties();
RunFonts runFonts105 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" };
FontSize fontSize105 = new FontSize() { Val = "16" };
FontSizeComplexScript fontSizeComplexScript105 = new FontSizeComplexScript() { Val = "16" };
paragraphMarkRunProperties50.Append(runFonts105);
paragraphMarkRunProperties50.Append(fontSize105);
paragraphMarkRunProperties50.Append(fontSizeComplexScript105);
paragraphProperties50.Append(widowControl50);
paragraphProperties50.Append(autoSpaceDE50);
paragraphProperties50.Append(autoSpaceDN50);
paragraphProperties50.Append(adjustRightIndent50);
paragraphProperties50.Append(spacingBetweenLines36);
paragraphProperties50.Append(justification11);
paragraphProperties50.Append(paragraphMarkRunProperties50);
Run run56 = new Run();
RunProperties runProperties56 = new RunProperties();
RunFonts runFonts106 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" };
Bold bold19 = new Bold();
BoldComplexScript boldComplexScript19 = new BoldComplexScript();
FontSize fontSize106 = new FontSize() { Val = "16" };
FontSizeComplexScript fontSizeComplexScript106 = new FontSizeComplexScript() { Val = "16" };
runProperties56.Append(runFonts106);
runProperties56.Append(bold19);
runProperties56.Append(boldComplexScript19);
runProperties56.Append(fontSize106);
runProperties56.Append(fontSizeComplexScript106);
Text text48 = new Text() { Space = SpaceProcessingModeValues.Preserve };
text48.Text = "Смоленская государственная медицинская академия ";
run56.Append(runProperties56);
run56.Append(text48);
paragraph52.Append(paragraphProperties50);
paragraph52.Append(run56);
Paragraph paragraph53 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" };
ParagraphProperties paragraphProperties51 = new ParagraphProperties();
WidowControl widowControl51 = new WidowControl() { Val = false };
AutoSpaceDE autoSpaceDE51 = new AutoSpaceDE() { Val = false };
AutoSpaceDN autoSpaceDN51 = new AutoSpaceDN() { Val = false };
AdjustRightIndent adjustRightIndent51 = new AdjustRightIndent() { Val = false };
SpacingBetweenLines spacingBetweenLines37 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
Justification justification12 = new Justification() { Val = JustificationValues.Center };
ParagraphMarkRunProperties paragraphMarkRunProperties51 = new ParagraphMarkRunProperties();
RunFonts runFonts107 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" };
FontSize fontSize107 = new FontSize() { Val = "16" };
FontSizeComplexScript fontSizeComplexScript107 = new FontSizeComplexScript() { Val = "16" };
paragraphMarkRunProperties51.Append(runFonts107);
paragraphMarkRunProperties51.Append(fontSize107);
paragraphMarkRunProperties51.Append(fontSizeComplexScript107);
paragraphProperties51.Append(widowControl51);
paragraphProperties51.Append(autoSpaceDE51);
paragraphProperties51.Append(autoSpaceDN51);
paragraphProperties51.Append(adjustRightIndent51);
paragraphProperties51.Append(spacingBetweenLines37);
paragraphProperties51.Append(justification12);
paragraphProperties51.Append(paragraphMarkRunProperties51);
Run run57 = new Run();
RunProperties runProperties57 = new RunProperties();
//.........这里部分代码省略.........
示例4: GenerateHeaderPart1Content
// Generates content of headerPart1.
private void GenerateHeaderPart1Content(HeaderPart headerPart1)
{
Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 w16se wp14" } };
header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
header1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex");
header1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
header1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex");
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("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
header1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex");
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 paragraph371 = new Paragraph() { RsidParagraphAddition = "0094109A", RsidParagraphProperties = "00624202", RsidRunAdditionDefault = "0094109A", ParagraphId = "0AAC1AD1", TextId = "295351A7" };
ParagraphProperties paragraphProperties368 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId28 = new ParagraphStyleId() { Val = "Footer" };
WidowControl widowControl1 = new WidowControl() { Val = false };
Indentation indentation25 = new Indentation() { End = "360" };
paragraphProperties368.Append(paragraphStyleId28);
paragraphProperties368.Append(widowControl1);
paragraphProperties368.Append(indentation25);
Run run755 = new Run();
RunProperties runProperties797 = new RunProperties();
NoProof noProof4 = new NoProof();
runProperties797.Append(noProof4);
Drawing drawing2 = new Drawing();
Wp.Inline inline1 = new Wp.Inline() { DistanceFromTop = (UInt32Value)0U, DistanceFromBottom = (UInt32Value)0U, DistanceFromLeft = (UInt32Value)0U, DistanceFromRight = (UInt32Value)0U, AnchorId = "0AAC1AD5", EditId = "0AAC1AD6" };
Wp.Extent extent2 = new Wp.Extent() { Cx = 1238250L, Cy = 190500L };
Wp.EffectExtent effectExtent2 = new Wp.EffectExtent() { LeftEdge = 0L, TopEdge = 0L, RightEdge = 0L, BottomEdge = 0L };
Wp.DocProperties docProperties2 = new Wp.DocProperties() { Id = (UInt32Value)1U, Name = "Picture 1" };
Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties2 = new Wp.NonVisualGraphicFrameDrawingProperties();
A.GraphicFrameLocks graphicFrameLocks2 = new A.GraphicFrameLocks() { NoChangeAspect = true };
graphicFrameLocks2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
nonVisualGraphicFrameDrawingProperties2.Append(graphicFrameLocks2);
A.Graphic graphic2 = new A.Graphic();
graphic2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
A.GraphicData graphicData2 = new A.GraphicData() { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" };
Pic.Picture picture2 = new Pic.Picture();
picture2.AddNamespaceDeclaration("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture");
Pic.NonVisualPictureProperties nonVisualPictureProperties2 = new Pic.NonVisualPictureProperties();
Pic.NonVisualDrawingProperties nonVisualDrawingProperties2 = new Pic.NonVisualDrawingProperties() { Id = (UInt32Value)0U, Name = "Picture 1" };
Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties2 = new Pic.NonVisualPictureDrawingProperties();
A.PictureLocks pictureLocks2 = new A.PictureLocks() { NoChangeAspect = true, NoChangeArrowheads = true };
nonVisualPictureDrawingProperties2.Append(pictureLocks2);
nonVisualPictureProperties2.Append(nonVisualDrawingProperties2);
nonVisualPictureProperties2.Append(nonVisualPictureDrawingProperties2);
Pic.BlipFill blipFill2 = new Pic.BlipFill();
A.Blip blip2 = new A.Blip() { Embed = "rId1" };
A.BlipExtensionList blipExtensionList2 = new A.BlipExtensionList();
A.BlipExtension blipExtension2 = new A.BlipExtension() { Uri = "{28A0092B-C50C-407E-A947-70E740481C1C}" };
A14.UseLocalDpi useLocalDpi2 = new A14.UseLocalDpi() { Val = false };
useLocalDpi2.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main");
blipExtension2.Append(useLocalDpi2);
blipExtensionList2.Append(blipExtension2);
blip2.Append(blipExtensionList2);
A.SourceRectangle sourceRectangle2 = new A.SourceRectangle();
A.Stretch stretch2 = new A.Stretch();
A.FillRectangle fillRectangle2 = new A.FillRectangle();
stretch2.Append(fillRectangle2);
blipFill2.Append(blip2);
//.........这里部分代码省略.........
示例5: GenerateHeaderPart2Content
// Generates content of headerPart2.
private void GenerateHeaderPart2Content(HeaderPart headerPart2)
{
Header header2 = new Header() {MCAttributes = new MarkupCompatibilityAttributes() {Ignorable = "w14 wp14"}};
header2.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
header2.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
header2.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
header2.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
header2.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
header2.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
header2.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
header2.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
header2.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
header2.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
header2.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
header2.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
header2.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
header2.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
header2.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Paragraph paragraph30 = new Paragraph() {RsidParagraphAddition = "0005059E", RsidRunAdditionDefault = "0005059E"};
ParagraphProperties paragraphProperties11 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId5 = new ParagraphStyleId() {Val = "Header"};
paragraphProperties11.Append(paragraphStyleId5);
paragraph30.Append(paragraphProperties11);
Paragraph paragraph31 = new Paragraph() {RsidParagraphAddition = "0005059E", RsidRunAdditionDefault = "0005059E"};
ParagraphProperties paragraphProperties12 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId6 = new ParagraphStyleId() {Val = "Header"};
paragraphProperties12.Append(paragraphStyleId6);
paragraph31.Append(paragraphProperties12);
header2.Append(paragraph30);
header2.Append(paragraph31);
headerPart2.Header = header2;
}
示例6: GenerateHeaderPart1Content
// Generates content of headerPart1.
private void GenerateHeaderPart1Content(HeaderPart headerPart1)
{
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 paragraph27 = new Paragraph()
{
RsidParagraphMarkRevision = "00442AD3",
RsidParagraphAddition = "0005059E",
RsidParagraphProperties = "00442AD3",
RsidRunAdditionDefault = "0005059E"
};
ParagraphProperties paragraphProperties8 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId2 = new ParagraphStyleId() {Val = "Title"};
ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
RunStyle runStyle1 = new RunStyle() {Val = "Strong"};
paragraphMarkRunProperties2.Append(runStyle1);
paragraphProperties8.Append(paragraphStyleId2);
paragraphProperties8.Append(paragraphMarkRunProperties2);
Run run43 = new Run();
Text text28 = new Text();
text28.Text = "Class name here";
run43.Append(text28);
paragraph27.Append(paragraphProperties8);
paragraph27.Append(run43);
header1.Append(paragraph27);
headerPart1.Header = header1;
}
示例7: GenerateHeaderPart1Content
// Generates content of headerPart1.
private void GenerateHeaderPart1Content(HeaderPart headerPart1)
{
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 paragraph113 = new Paragraph() { RsidParagraphAddition = "00963B42", RsidRunAdditionDefault = "00963B42" };
ParagraphProperties paragraphProperties65 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" };
Justification justification10 = new Justification() { Val = JustificationValues.Right };
paragraphProperties65.Append(paragraphStyleId1);
paragraphProperties65.Append(justification10);
paragraph113.Append(paragraphProperties65);
Paragraph paragraph114 = new Paragraph() { RsidParagraphAddition = "00963B42", RsidRunAdditionDefault = "00963B42" };
ParagraphProperties paragraphProperties66 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId2 = new ParagraphStyleId() { Val = "Header" };
paragraphProperties66.Append(paragraphStyleId2);
paragraph114.Append(paragraphProperties66);
header1.Append(paragraph113);
header1.Append(paragraph114);
headerPart1.Header = header1;
}