MindFusion.Wpf Pack Programmer's Guide
CellAnnotation Class
Remarks See Also
 





Represents the interactive object containing a comment for a cell within a worksheet.

Namespace: MindFusion.Spreadsheet.Wpf
Assembly: MindFusion.Spreadsheet.Wpf

 Syntax

C#  Copy Code

public class CellAnnotation : InteractiveObject

Visual Basic  Copy Code

Public Class CellAnnotation
    Inherits InteractiveObject

 Remarks

Objects of this class cannot be instantiated directly. To create and associate an annotation with a cell, call the SetAnnotation method of the cell. Then, you can access the corresponding CellAnnotation object through the CellAnnotation property of the cell's Annotation.

The CellAnnotation class overrides the default values of some of the properties derived from InteractiveObject, as follows:

In addition the CellAnnotation objects draw a black outline when LineBrush is not set.

 Example

The following example illustrates how to set and customize a cell annotation.

C#  Copy Code

// Create the annotation
var cell = worksheet.Cells["A1"];
cell.SetAnnotation("Test annotation");

// Customize the annotation's appearance
cell.Annotation.CellAnnotation.BackBrush = Brushes.LightSteelBlue;

Visual Basic  Copy Code

' Create the annotation
Dim cell = worksheet.Cells("A1")
cell.SetAnnotation("Test annotation")

' Customize the annotation's appearance
cell.Annotation.CellAnnotation.BackBrush = Brushes.LightSteelBlue

 Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            MindFusion.Spreadsheet.Wpf.InteractiveObject
                MindFusion.Spreadsheet.Wpf.CellAnnotation

 See Also

CellAnnotation Members
MindFusion.Spreadsheet.Wpf Namespace