/*
         * Except for code enclosed in "CUSTOM MODIFICATION", all code and comments below this point
         * were generated by the Open XML SDK 2.5 Productivity Tool which you can get from here:
         * https://www.microsoft.com/en-us/download/details.aspx?id=30425
         */

        // Adds child parts and generates content of the specified part.
        public static void CreateWebExTaskpanesPart(WebExTaskpanesPart part, string snippetID)
        {
            WebExtensionPart webExtensionPart1 = part.AddNewPart <WebExtensionPart>("rId1");

            GenerateWebExtensionPart1Content(webExtensionPart1, snippetID);

            GeneratePartContent(part);
        }
示例#2
0
        /*
         * Except for code enclosed in "CUSTOM MODIFICATION", all code and comments below this point
         * were generated by the Open XML SDK 2.5 Productivity Tool which you can get from here:
         * https://www.microsoft.com/en-us/download/details.aspx?id=30425
         */

        // Adds child parts and generates content of the specified part.
        public static void CreateWebExTaskpanesPart(WebExTaskpanesPart part, string guid, string version)
        {
            WebExtensionPart webExtensionPart1 = part.AddNewPart <WebExtensionPart>("rId1");

            GenerateWebExtensionPart1Content(webExtensionPart1, guid, version);

            GeneratePartContent(part);
        }
        // Generates content of part.
        private static void GeneratePartContent(WebExTaskpanesPart part)
        {
            Wetp.Taskpanes taskpanes1 = new Wetp.Taskpanes();
            taskpanes1.AddNamespaceDeclaration("wetp", "http://schemas.microsoft.com/office/webextensions/taskpanes/2010/11");

            Wetp.WebExtensionTaskpane webExtensionTaskpane1 = new Wetp.WebExtensionTaskpane()
            {
                DockState = "right", Visibility = true, Width = 350D, Row = (UInt32Value)4U
            };

            Wetp.WebExtensionPartReference webExtensionPartReference1 = new Wetp.WebExtensionPartReference()
            {
                Id = "rId1"
            };
            webExtensionPartReference1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");

            webExtensionTaskpane1.Append(webExtensionPartReference1);

            taskpanes1.Append(webExtensionTaskpane1);

            part.Taskpanes = taskpanes1;
        }
 /// <summary>
 /// Saves the DOM into the WebExTaskpanesPart.
 /// </summary>
 /// <param name="openXmlPart">Specifies the part to save to.</param>
 public void Save(WebExTaskpanesPart openXmlPart)
 {
     base.SaveToPart(openXmlPart);
 }
 /// <summary>
 /// Loads the DOM from the WebExTaskpanesPart
 /// </summary>
 /// <param name="openXmlPart">Specifies the part to be loaded.</param>
 public void Load(WebExTaskpanesPart openXmlPart)
 {
     LoadFromPart(openXmlPart);
 }
 internal Taskpanes(WebExTaskpanesPart ownerPart) : base(ownerPart)
 {
 }