Back to Devexpress

AnnotationRepositoryChangingEventArgs Class

corelibraries-devexpress-dot-xtracharts-459bf9bb.md

latest3.2 KB
Original Source

AnnotationRepositoryChangingEventArgs Class

Data for the ChartControl.AnnotationRepositoryChanging event.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public class AnnotationRepositoryChangingEventArgs :
    EventArgs
vb
Public Class AnnotationRepositoryChangingEventArgs
    Inherits EventArgs

AnnotationRepositoryChangingEventArgs is the data class for the following events:

Remarks

The AnnotationRepositoryChanging event occurs when a user adds, edits or deletes an annotation before this change is applied to the annotation repository. The AnnotationRepositoryChangingEventArgs class exposes the following properties:

Example

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

Inheritance

Object EventArgs AnnotationRepositoryChangingEventArgs AnnotationImageEditingEventArgs

AnnotationTextEditingEventArgs

See Also

AnnotationRepositoryChangingEventArgs Members

AnnotationRepositoryChanging

Annotations

DevExpress.XtraCharts Namespace