Back to Devexpress

AnnotationRepositoryChangingEventArgs.Annotation Property

corelibraries-devexpress-dot-xtracharts-dot-annotationrepositorychangingeventargs.md

latest2.1 KB
Original Source

AnnotationRepositoryChangingEventArgs.Annotation Property

Returns the annotation that is being changed.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public Annotation Annotation { get; }
vb
Public ReadOnly Property Annotation As Annotation

Property Value

TypeDescription
Annotation

The changed annotation.

|

Remarks

The following example prevents Annotation1 from being deleted.

csharp
void chartControl1_AnnotationRepositoryChanging(object sender, AnnotationRepositoryChangingEventArgs e) {
    if (e.Annotation.Name == "Annotation1" && e.Change == AnnotationRepositoryChange.Deletion) {
        e.Cancel = true;
    }
}
vb
Private Sub chartControl1_AnnotationRepositoryChanging(ByVal sender As Object, ByVal e As AnnotationRepositoryChangingEventArgs)
    If e.Annotation.Name = "Annotation 1" AndAlso e.Change = AnnotationRepositoryChange.Deletion Then
        e.Cancel = True
    End If
End Sub

See Also

Annotations

AnnotationTextEditingEventArgs

AnnotationImageEditingEventArgs

AnnotationRepositoryChangingEventArgs Class

AnnotationRepositoryChangingEventArgs Members

DevExpress.XtraCharts Namespace