Frame Class

Single Frame Properties.When the object is serialized out as xml, its qualified name is w:frame.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Wordprocessing.Frame

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

Syntax

声明
<ChildElementInfoAttribute(GetType(FrameSize))> _
<ChildElementInfoAttribute(GetType(FrameName))> _
<ChildElementInfoAttribute(GetType(SourceFileReference))> _
<ChildElementInfoAttribute(GetType(MarginWidth))> _
<ChildElementInfoAttribute(GetType(MarginHeight))> _
<ChildElementInfoAttribute(GetType(ScrollbarVisibility))> _
<ChildElementInfoAttribute(GetType(NoResizeAllowed))> _
<ChildElementInfoAttribute(GetType(LinkedToFile))> _
Public Class Frame _
    Inherits OpenXmlCompositeElement
用法
Dim instance As Frame
[ChildElementInfoAttribute(typeof(FrameSize))]
[ChildElementInfoAttribute(typeof(FrameName))]
[ChildElementInfoAttribute(typeof(SourceFileReference))]
[ChildElementInfoAttribute(typeof(MarginWidth))]
[ChildElementInfoAttribute(typeof(MarginHeight))]
[ChildElementInfoAttribute(typeof(ScrollbarVisibility))]
[ChildElementInfoAttribute(typeof(NoResizeAllowed))]
[ChildElementInfoAttribute(typeof(LinkedToFile))]
public class Frame : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • FrameSize <w:sz>

  • FrameName <w:name>

  • SourceFileReference <w:sourceFileName>

  • MarginWidth <w:marW>

  • MarginHeight <w:marH>

  • ScrollbarVisibility <w:scrollbar>

  • NoResizeAllowed <w:noResizeAllowed>

  • LinkedToFile <w:linkedToFile>

[ISO/IEC 29500-1 第 1 个版本]

17.15.2.16 frame (Single Frame Properties)

This element specifies the properties for a single frame within a frameset document. When a document defines a frameset using the frameset element; that frameset is composed of a set of frames, each of which is specified by a single frame element.

[Example: Consider a WordprocessingML document which serves as the frameset container for a frameset consisting of the following three frames:

DocumentFormat.OpenXml.Wordprocessing.Frame-image0

The frameset properties for this document are specified by the following WordprocessingML within the web page settings:

<w:frameset>
  …
  <w:frame>
    <w:sz w:val="20%" />
<w:name w:val="Frame 1" />
<w:sourceFileName r:id="rId1" />
  </w:frame>
  <w:frameset>
    …
  </w:frameset>
</w:frameset>

The frame element specifies the set of properties for a single frame in the document. In this case, these properties (for the frame marked with Frame 1 in the diagram above) specify that the frame must have the following properties:

  • A height of 20% of the height of the document

  • A name of Frame 1

  • The contents of the frame must be pulled from the document that is the target of the relationship with ID rId1

end example]

Parent Elements

frameset (§17.15.2.18); frameset (§17.15.2.19)

Child Elements

Subclause

linkedToFile (Maintain Link to Existing File)

§17.15.2.22

longDesc (Frame Long Description)

§17.15.2.23

marH (Top and Bottom Margin for Frame)

§17.15.2.25

marW (Left and Right Margin for Frame)

§17.15.2.29

name (Frame Name)

§17.15.2.30

noResizeAllowed (Frame Cannot Be Resized)

§17.15.2.32

scrollbar (Scrollbar Display Option)

§17.15.2.38

sourceFileName (Source File for Frame)

§17.15.2.39

sz (Frame Size)

§17.15.2.40

title (Frame or Frameset Title)

§17.15.2.43

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

© ISO/IEC29500: 2008. 以上摘要已经由 Microsoft(和/或其代理公司)从英语翻译为简体中文,ISO 对此翻译不承担任何责任。

Thread Safety

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

See Also

Reference

Frame Members

DocumentFormat.OpenXml.Wordprocessing Namespace