Поделиться через


ShapeAutoFit Class

Shape AutoFit.When the object is serialized out as xml, its qualified name is a:spAutoFit.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Drawing.ShapeAutoFit

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

Syntax

'Декларация
Public Class ShapeAutoFit _
    Inherits OpenXmlLeafElement
'Применение
Dim instance As ShapeAutoFit
public class ShapeAutoFit : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 редакция 1]

21.1.2.1.4 spAutoFit (Shape AutoFit)

This element specifies that a shape should be auto-fit to fully contain the text described within it. Auto-fitting is when text within a shape is scaled in order to contain all the text inside. If this element is omitted, then noAutofit or auto-fit off is implied.

[Example: Consider the situation where a user is building a diagram and needs to have the text for each shape that they are using stay within the bounds of the shape. An easy way this might be done is by using spAutofit. The following DrawingML illustrates how this might be accomplished.

<p:sp>
<p:txBody>
<a:bodyPr rtlCol="0" anchor="ctr">
<a:spAutoFit/>
</a:bodyPr>
…
<a:p>
…
<a:t>Diagram Object 1</a:t>
…
</a:p>
</p:txBody>
</p:sp>
<p:sp>
<p:txBody>
<a:bodyPr rtlCol="0" anchor="ctr">
<a:spAutoFit/>
</a:bodyPr>
…
<a:p>
…
<a:t>Diagram Object 2</a:t>
…
</a:p>
</p:txBody>
</p:sp>

In the above example there are two shapes that have spAutoFit turned on so that when the user types more text within the shape that the shape actually resizes to accommodate the new data. end example]

Parent Elements

bodyPr (§21.1.2.1.1)

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

© ISO/IEC29500: 2008. Приведенный выше текст переведен с английского языка на русский корпорацией Майкрософт (или ее подрядчиками) и 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

ShapeAutoFit Members

DocumentFormat.OpenXml.Drawing Namespace