3.6 Property Bag Format

The following is an example of persistence to a property bag, as specified in section 2.1.1.1. In this example, a TabStrip control is persisted as an embedded control within an Office Open XML SpreadsheetML package, which is described in [ECMA-376] part 1, section 8.4.

The Office Open XML document relationship, as described in [ECMA-376] part 1, section 9.2, and the package parts, as described in [ECMA-376] part 1, section 8.1, that are shown in the example are not required or specified by Office Forms. [ECMA-376] part 1, section 15.2.9, describes embedded controls in an Office Open XML document. The only parts of the example that are controlled by Office Forms are the name of each property and the type and format of each property value.

The persistence of the data structures for this TabStrip control can be applied to other control types.

The following text illustrates a TabStrip persisted as an embedded control within an Office Open XML document. It has the following properties set:

  • Three tabs.

  • The Captions are set to "Tab1", "Tab2", and "Tab3" for the first, second, and third tabs, respectively.

  • The Accelerators are set to "1", "2", and "3" for the first, second, and third tabs, respectively.

  • The Tooltip strings are set to "Select Tab1", "Select Tab2", and "Select Tab3" for the first, second, and third tabs, respectively.

  • The Tag of each tab is an empty string.

  • The TabsAllocated value is set to 3.

  • A TabStripTabFlag is set for each of the three tabs.

  • A TabStripTabFlagData that is visible and enabled is set for each tab.

  • The first tab is selected, which means that the ListIndex property is set to zero.

  • The BackColor is set to 0x80000005.

  • The ForeColor is set to 0x80000008.

  • The Size is set to a Width of 441.75 points and a Height of 208.5 points.

  • The MouseIcon property is set to a picture.<20>

  • The NewVersion is set to TRUE.

  • The FontName is set to "Calibri".

  • The FontHeight is set to 11.25.

  • The FontCharSet is set to zero.

  • The FontPitchAndFamily is set to an fmFontPitch meaning that the characters have varying widths, and an fmFontFamily meaning that the font has variable stroke width (a proportional font) and does not use serifs.

     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
     <ax:ocx ax:classid="{EAE50EB0-4A62-11CE-BED6-00AA00611080}" ax:persistence="persistPropertyBag" xmlns:ax="http://schemas.microsoft.com/office/2006/activeX" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
         <ax:ocxPr ax:name="ListIndex" ax:value="0"/>
         <ax:ocxPr ax:name="BackColor" ax:value="2147483653"/>
         <ax:ocxPr ax:name="ForeColor" ax:value="2147483656"/>
         <ax:ocxPr ax:name="Size" ax:value="15584;7355"/>
         <ax:ocxPr ax:name="Items" ax:value="Tab1;Tab2;Tab3;"/>
         <ax:ocxPr ax:name="MousePointer" ax:value="99"/>
         <ax:ocxPr ax:name="TipStrings" ax:value="Select Tab 1;Select Tab 2;Select Tab 3;"/>
         <ax:ocxPr ax:name="Names" ax:value="Tab1;Tab2;Tab3;"/>
         <ax:ocxPr ax:name="NewVersion" ax:value="-1"/>
         <ax:ocxPr ax:name="TabsAllocated" ax:value="3"/>
         <ax:ocxPr ax:name="Tags" ax:value=";;;"/>
         <ax:ocxPr ax:name="TabData" ax:value="3"/>
         <ax:ocxPr ax:name="Accelerator" ax:value="1;2;3;"/>
         <ax:ocxPr ax:name="MouseIcon">
             <ax:picture r:id="rId1"/>
         </ax:ocxPr>
         <ax:ocxPr ax:name="FontName" ax:value="Calibri"/>
         <ax:ocxPr ax:name="FontHeight" ax:value="225"/>
         <ax:ocxPr ax:name="FontCharSet" ax:value="0"/>
         <ax:ocxPr ax:name="FontPitchAndFamily" ax:value="34"/>
         <ax:ocxPr ax:name="TabState" ax:value="3;3;3"/>
     </ax:ocx>