CommentProperties Class
Defines the CommentProperties Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is x:commentPr.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Spreadsheet.CommentProperties
Namespace: DocumentFormat.OpenXml.Spreadsheet
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ObjectAnchor), FileFormatVersions.Office2010)> _
Public Class CommentProperties _
Inherits OpenXmlCompositeElement
'Usage
Dim instance As CommentProperties
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ObjectAnchor), FileFormatVersions.Office2010)]
public class CommentProperties : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
- ObjectAnchor <x:anchor>
[ISO/IEC 29500-1 1st Edition]
18.7.5 commentPr (Comment Properties)
This element specifies the visual and positional properties of a comment.
[Example: In the following example, the comment's visual representation resizes with the
<comment … > <text> … </text> <commentPr autoFill="false"> <anchor moveWithCells="true" sizeWithCells="true"> <from> … </from> <to> … </to> <anchor> </commentPr> </comment>
end example]
Parent Elements |
---|
comment (§18.7.3) |
Child Elements |
Subclause |
---|---|
anchor (Object Cell Anchor) |
§18.3.1.1 |
Attributes |
Description |
---|---|
altText (Alternative Text) |
Specifies alternative text for the object, for use by assistive technologies or applications. [Example: <commentPr altText="Alternate text" … /> end example] The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19). |
autoFill (Automatic Fill Flag) |
Specifies whether the object's fill formatting is provided automatically by the application. [Example: <commentPr autoFill="false" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
autoLine (Automatic Line Flag) |
Specifies whether the object's line formatting is provided automatically by the application. [Example: <commentPr autoLine="false" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
autoScale (Automatic Text Scaling Flag) |
Specifies whether the object's font is automatically scaled by the application when the object is resized. [Example: <commentPr autoScale="true" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
colHidden (Hidden Column Flag) |
Specifies that the column of the cell to which this comment points is hidden. [Example: <commentPr colHidden="true" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
defaultSize (Default Size Flag) |
Specifies whether the object is at its default size. [Example: <commentPr defaultSize="false" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
disabled (Disabled Flag) |
Specifies whether the object is allowed to run an attached macro. [Example: <commentPr disabled="true" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
justLastX (Far East Alignment Flag) |
Specifies that Far East alignment is set for the last line in the comment's text. Typically, justified text in Far East environments leaves the last line unjustified. Specifying this element also justifies the last line. [Example: <commentPr justLastX="true" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
locked (Locked Flag) |
Specifies that the object is locked when the sheet is protected. [Example: <commentPr locked="false" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
lockText (Text Lock Flag) |
Specifies that the object's text is locked. [Example: <commentPr lockText="true" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
print (Print Flag) |
Specifies whether the object is printed when the document is printed. [Example: <commentPr print="false" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
rowHidden (Hidden Row Flag) |
Specifies that the row of the cell to which this comment points is hidden. [Example: <commentPr rowHidden="true" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
textHAlign (Text Horizontal Alignment) |
Specifies the horizontal alignment of the comment's text field. [Example: <commentPr textHAlign="center" … /> end example] The possible values for this attribute are defined by the ST_TextHAlign simple type (§18.18.80). |
textVAlign (ext Vertical Alignment) |
Specifies the vertical alignment of the comment's text field. [Example: <commentPr textVAlign="center" … /> end example] The possible values for this attribute are defined by the ST_TextVAlign simple type (§18.18.81). |
uiObject (UI Object Flag) |
Specifies whether the object is a UI Object. [Example: <commentPr uiObject="true" … /> end example] The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
[Note: The W3C XML Schema definition of this element’s content model (CT_CommentPr) is located in §A.2. end note]
© ISO/IEC29500: 2008.
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.