Class CommentsCollection
Collection stores all comments in the worksheet.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Collections
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class CommentsCollection : CollectionBaseEx<CommentShapeImpl>, IList<CommentShapeImpl>, ICollection<CommentShapeImpl>, IEnumerable<CommentShapeImpl>, IParentApplication, ICloneParent, IComments, IEnumerable
Constructors
CommentsCollection(IApplication, Object)
Creates new instance of the collection and sets its parent and application properties.
Declaration
public CommentsCollection(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the collection. |
System.Object | parent | Parent object for the collection. |
Properties
Count
Returns the number of comments in the collection
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
Item[Int32]
Returns single entry from the collection. Read-only.
Declaration
public ICommentShape this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type |
---|
ICommentShape |
Item[Int32, Int32]
Returns single entry from the collection by row and column one-based indexes. Read-only.
Declaration
public ICommentShape this[int iRow, int iColumn] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | |
System.Int32 | iColumn |
Property Value
Type |
---|
ICommentShape |
Item[String]
Gets single item from the collection.
Declaration
public ICommentShape this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the item to get. |
Property Value
Type | Description |
---|---|
ICommentShape | Single item from the collection. |
ReRegisterOnAccess
This property indicates whether internal hashtable is invalid and must be filled once again before accessing.
Declaration
public bool ReRegisterOnAccess { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
AddComment(IRange)
Adds comment to the specified range.
Declaration
public ICommentShape AddComment(IRange parentRange)
Parameters
Type | Name | Description |
---|---|---|
IRange | parentRange | Range that should be commented. |
Returns
Type | Description |
---|---|
ICommentShape | Newly created comment shape. |
AddComment(Int32, Int32)
Adds comment to the specified range.
Declaration
public ICommentShape AddComment(int iRow, int iColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Row of the cell to add comment to. |
System.Int32 | iColumn | Column of the cell to add comment to. |
Returns
Type | Description |
---|---|
ICommentShape | Newly created comment shape. |
AddComment(Int32, Int32, Boolean)
Adds comment to the specified range.
Declaration
public ICommentShape AddComment(int iRow, int iColumn, bool bIsParseOptions)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Row of the cell to add comment to. |
System.Int32 | iColumn | Column of the cell to add comment to. |
System.Boolean | bIsParseOptions | Indicates is parse comment fill line options. |
Returns
Type | Description |
---|---|
ICommentShape | Newly created comment shape. |
Clear()
Remove all ICommentShape from the IComments collection.
Declaration
public void Clear()
OnClear()
OnClear is invoked before Clear behavior.
Declaration
protected override void OnClear()
Overrides
OnClearComplete()
OnClear is invoked after Clear behavior.
Declaration
protected override void OnClearComplete()
Overrides
OnInsertComplete(Int32, CommentShapeImpl)
Performs additional processes after inserting a new element into the collection.
Declaration
protected override void OnInsertComplete(int index, CommentShapeImpl value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which to insert value. |
CommentShapeImpl | value | The new value of the element at index. |
Overrides
OnRemoveComplete(Int32, CommentShapeImpl)
Performs additional processes after removing an element from the collection.
Declaration
protected override void OnRemoveComplete(int index, CommentShapeImpl value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which the value can be found. |
CommentShapeImpl | value | The value of the element to remove from index. |
Overrides
OnSetComplete(Int32, CommentShapeImpl, CommentShapeImpl)
Performs additional processes after setting a value in the collection.
Declaration
protected override void OnSetComplete(int index, CommentShapeImpl oldValue, CommentShapeImpl newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which oldValue can be found. |
CommentShapeImpl | oldValue | The value to replace with newValue. |
CommentShapeImpl | newValue | The new value of the element at the index. |
Overrides
Remove(ICommentShape)
Removes comment from the collection.
Declaration
public void Remove(ICommentShape comment)
Parameters
Type | Name | Description |
---|---|---|
ICommentShape | comment | Comment to remove from the collection. |