Class
NoteCollection

Collection of notes attached to worksheet cells, supporting visibility control and conversion to threaded comments.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class NoteCollection : FilteredShapeCollection<SpreadsheetNote>, IEnumerable<SpreadsheetNote>, IEnumerable

Inheritance: objectFilteredShapeCollection<SpreadsheetNote>NoteCollection

Implements: IEnumerableIEnumerable<SpreadsheetNote>

Inherited Members FilteredShapeCollection<SpreadsheetNote>.Remove(SpreadsheetNote)FilteredShapeCollection<SpreadsheetNote>.Contains(SpreadsheetNote)FilteredShapeCollection<SpreadsheetNote>.IndexOf(SpreadsheetNote)FilteredShapeCollection<SpreadsheetNote>.Clear()FilteredShapeCollection<SpreadsheetNote>.GetEnumerator()FilteredShapeCollection<SpreadsheetNote>.GetZIndex(SpreadsheetNote)FilteredShapeCollection<SpreadsheetNote>.Add(SpreadsheetNote)FilteredShapeCollection<SpreadsheetNote>.OnItemAdding(SpreadsheetNote, out ShapeCollectionChangingEventArgs<SpreadsheetNote>)FilteredShapeCollection<SpreadsheetNote>.OnItemRemoving(SpreadsheetNote, out ShapeCollectionChangingEventArgs<SpreadsheetNote>)FilteredShapeCollection<SpreadsheetNote>.OnChanging(ShapeCollectionChangingEventArgs<SpreadsheetNote>)FilteredShapeCollection<SpreadsheetNote>.OnChanged(ShapeCollectionChangedEventArgs<SpreadsheetNote>)FilteredShapeCollection<SpreadsheetNote>.CountFilteredShapeCollection<SpreadsheetNote>.this[int]FilteredShapeCollection<SpreadsheetNote>.WorksheetFilteredShapeCollection<SpreadsheetNote>.ChangingFilteredShapeCollection<SpreadsheetNote>.Changed

Constructors

NoteCollection(Worksheet)

Initializes a new note collection for the specified worksheet.

Declaration

cs-api-definition
public NoteCollection(Worksheet worksheet)

Parameters

worksheet

Worksheet

The worksheet.

Properties

ShapeType

Returns FloatingShapeType.Note to identify notes within the shape collection.

Declaration

cs-api-definition
public override FloatingShapeType ShapeType { get; }

Property Value

FloatingShapeType

Overrides FilteredShapeCollection<SpreadsheetNote>.ShapeType

Methods

Add(CellIndex, CellIndex, string, string)

Adds a note to the specified cell with custom positioning and returns the created note.

Declaration

cs-api-definition
public SpreadsheetNote Add(CellIndex relatedCellIndex, CellIndex cellIndex, string author, string text)

Parameters

relatedCellIndex

CellIndex

Index of the cell assigned to the note.

cellIndex

CellIndex

Index of the cell where the top left corner of the note is visualized.

author

string

The author.

text

string

The text.

Returns

SpreadsheetNote

The new note.

Add(CellIndex, string, string)

Adds a note to the specified cell with default positioning and returns the created note.

Declaration

cs-api-definition
public SpreadsheetNote Add(CellIndex relatedCellIndex, string author, string text)

Parameters

relatedCellIndex

CellIndex

Index of the cell assigned to the note.

author

string

The author.

text

string

The text.

Returns

SpreadsheetNote

The new note.

ConvertToComments()

Converts all non-fallback notes to threaded SpreadsheetComment instances.

Declaration

cs-api-definition
public void ConvertToComments()

Hide(SpreadsheetNote)

Hides the specified note from view without removing it from the collection.

Declaration

cs-api-definition
public void Hide(SpreadsheetNote note)

Parameters

note

SpreadsheetNote

The note.

HideAll()

Hides all notes in the collection from view as a single operation.

Declaration

cs-api-definition
public void HideAll()

OnNotesVisibilityChanged()

Raises the NotesVisibilityChanged event when all notes' visibility changes.

Declaration

cs-api-definition
protected virtual void OnNotesVisibilityChanged()

Show(SpreadsheetNote)

Makes the specified note visible in the worksheet.

Declaration

cs-api-definition
public void Show(SpreadsheetNote note)

Parameters

note

SpreadsheetNote

The note.

ShowAll()

Makes all notes in the collection visible as a single operation.

Declaration

cs-api-definition
public void ShowAll()

Events

NotesVisibilityChanged

Raised when the visibility of all notes is changed together via ShowAll or HideAll.

Declaration

cs-api-definition
public event EventHandler NotesVisibilityChanged

Event Value

EventHandler