本文整理汇总了C#中System.Windows.Forms.Document.AddNamespaceDeclaration方法的典型用法代码示例。如果您正苦于以下问题:C# Document.AddNamespaceDeclaration方法的具体用法?C# Document.AddNamespaceDeclaration怎么用?C# Document.AddNamespaceDeclaration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Document
的用法示例。
在下文中一共展示了Document.AddNamespaceDeclaration方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 w16se wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex");
document1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
document1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex");
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("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex");
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 = "009032DC", RsidParagraphAddition = "008129E8", RsidParagraphProperties = "009032DC", RsidRunAdditionDefault = "001D0DE9", ParagraphId = "0AAC1914", TextId = "772958DA" };
ParagraphProperties paragraphProperties1 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Title" };
ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
Bold bold1 = new Bold() { Val = false };
FontSize fontSize1 = new FontSize() { Val = "72" };
paragraphMarkRunProperties1.Append(bold1);
paragraphMarkRunProperties1.Append(fontSize1);
paragraphProperties1.Append(paragraphStyleId1);
paragraphProperties1.Append(paragraphMarkRunProperties1);
BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" };
BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" };
Run run1 = new Run();
RunProperties runProperties1 = new RunProperties();
FontSize fontSize2 = new FontSize() { Val = "72" };
runProperties1.Append(fontSize2);
Text text1 = new Text();
text1.Text = "P";
run1.Append(runProperties1);
run1.Append(text1);
Run run2 = new Run() { RsidRunProperties = "009032DC", RsidRunAddition = "008129E8" };
RunProperties runProperties2 = new RunProperties();
FontSize fontSize3 = new FontSize() { Val = "72" };
runProperties2.Append(fontSize3);
Text text2 = new Text();
text2.Text = "roject:";
run2.Append(runProperties2);
run2.Append(text2);
paragraph1.Append(paragraphProperties1);
paragraph1.Append(bookmarkStart1);
paragraph1.Append(bookmarkEnd1);
paragraph1.Append(run1);
paragraph1.Append(run2);
Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "009032DC", RsidParagraphAddition = "008129E8", RsidParagraphProperties = "009032DC", RsidRunAdditionDefault = "008129E8", ParagraphId = "0AAC1915", TextId = "5B14AE4B" };
ParagraphProperties paragraphProperties2 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId2 = new ParagraphStyleId() { Val = "Title" };
ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
Bold bold2 = new Bold() { Val = false };
Color color1 = new Color() { Val = "FF0000" };
FontSize fontSize4 = new FontSize() { Val = "72" };
paragraphMarkRunProperties2.Append(bold2);
paragraphMarkRunProperties2.Append(color1);
paragraphMarkRunProperties2.Append(fontSize4);
paragraphProperties2.Append(paragraphStyleId2);
paragraphProperties2.Append(paragraphMarkRunProperties2);
Run run3 = new Run() { RsidRunProperties = "009032DC" };
RunProperties runProperties3 = new RunProperties();
Color color2 = new Color() { Val = "FF0000" };
FontSize fontSize5 = new FontSize() { Val = "72" };
runProperties3.Append(color2);
runProperties3.Append(fontSize5);
Text text3 = new Text() { Space = SpaceProcessingModeValues.Preserve };
//.........这里部分代码省略.........