Export (0) Print
Expand All

FrameSize class

Frame Size. When the object is serialized out as xml, its qualified name is w:sz.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class FrameSize : StringType

[ISO/IEC 29500-1 1st Edition]

sz (Frame Size)

This element specifies the size for a single frame within a frameset.

This size shall be interpreted based on the contents of the frameLayout element (§17.15.2.17) for the parent frameset, as follows:

  • If the val attribute on that element is cols, then this element specifies the width of the frame

  • If the val attribute on that element is rows, then this element specifies the height of the frame

Once the axis of this measurement has been established using the criteria above, the actual value of the measurement shall be determined by the following:

  • If the val attribute ends in a asterisk (*), then this measurement is a relative measurement (relative to all other frames in this frameset).

  • If the val attribute ends in a percentage symbol (%), then this measurement is a percentage of the height and/or width of the parent window, respectively.

  • Otherwise, the value of the val attribute specifies the size of the frame in pixels. This measurement shall be interpreted in the context of the pixelsPerInch element (§17.15.2.34) to determine the width of the resulting measurement in inches.

If this element is omitted, then no information shall be implied about the size of the current frame.

[Example: Consider a frameset consisting of the following three frames:

The following properties define the presentation of the top frame within this frameset:

<w:frameset>
  …  <w:frame>
    <w:sz w:val="300" />
    <w:name w:val="Frame 1" />
  </w:frame>
  …  <w:pixelsPerInch w:val="150" />
</w:frameset>

The sz element's val attribute specifies that the size of this frame is 300 - which translates to a height of exactly 300 pixels tall. In addition, this document specifies that the intended number of pixels per inch for this measurement is 150, resulting in a 2" tall frame height. end example]

Parent Elements

frame (§17.15.2.16)

Attributes

Description

val (String Value)

Specifies that its contents contain a string.

The contents of this string are interpreted based on the context of the parent XML element.

[Example: Consider the following WordprocessingML fragment:

<w:pPr>
  <w:pStyle w:val="heading1" /> 
</w:pPr>

The value of the val attribute is the ID of the associated paragraph style's styleId.

However, consider the following fragment:

<w:sdtPr>
  <w:alias w:val="SDT Title Example" />
  …
</w:sdtPr>

In this case, the decimal number in the val attribute is the caption of the parent structured document tag. In each case, the value is interpreted in the context of the parent element. end example]

The possible values for this attribute are defined by the ST_String simple type (§22.9.2.13).

[Note: The W3C XML Schema definition of this element’s content model (CT_String) is located in §A.1. end note]

[ISO/IEC 29500-1 1st Edition]

sz (Nested Frameset Size)

This element specifies the size for a frameset that has been nested within another frameset. If this size appears on a root frameset, then it can be ignored and the main frameset shall encompass the entire window.

This size shall be interpreted based on the contents of the frameLayout element (§17.15.2.17) for the parent frameset (not the current nested frameset), as follows:

  • If the val attribute on that element is cols, then this element specifies the width of the frameset

  • If the val attribute on that element is rows, then this element specifies the height of the frameset

Once the axis of this measurement has been established using the criteria above, the actual value of the measurement shall be determined by the following:

  • If the val attribute ends in a asterisk (*), then this measurement is a relative measurement (relative to all other frames in this frameset).

  • If the val attribute ends in a percentage symbol (%), then this measurement is a percentage of the height and/or width of the parent frameset, respectively.

  • Otherwise, the value of the val attribute specifies the size of the frameset in pixels. This measurement shall be interpreted in the context of the pixelsPerInch element (§17.15.2.34) to determine the width of the resulting measurement in inches.

If this element is omitted, then no information shall be implied about the size of the current frameset.

[Example: Consider a nested frameset defined as follows:

<w:frameset>
  …  <w:frameset>
    <w:sz w:val="50%" />
    …  </w:frameset>
  …  <w:pixelsPerInch w:val="150" />
</w:frameset>

The sz element's val attribute specifies that the size of this nested frameset is 50% - which translates to a width of fifty percent of the width of the parent frameset's height. end example]

Parent Elements

frameset (§17.15.2.18); frameset (§17.15.2.19)

Attributes

Description

val (String Value)

Specifies that its contents contain a string.

The contents of this string are interpreted based on the context of the parent XML element.

[Example: Consider the following WordprocessingML fragment:

<w:pPr>
  <w:pStyle w:val="heading1" /> 
</w:pPr>

The value of the val attribute is the ID of the associated paragraph style's styleId.

However, consider the following fragment:

<w:sdtPr>
  <w:alias w:val="SDT Title Example" />
  …
</w:sdtPr>

In this case, the decimal number in the val attribute is the caption of the parent structured document tag. In each case, the value is interpreted in the context of the parent element. end example]

The possible values for this attribute are defined by the ST_String simple type (§22.9.2.13).

[Note: The W3C XML Schema definition of this element’s content model (CT_String) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

Show:
© 2014 Microsoft