Back to Devexpress

AnnotationRepositoryChangingEventArgs.Change Property

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

latest2.6 KB
Original Source

AnnotationRepositoryChangingEventArgs.Change Property

Returns the AnnotationRepositoryChange value that indicates the type of change a user makes.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public AnnotationRepositoryChange Change { get; }
vb
Public ReadOnly Property Change As AnnotationRepositoryChange

Property Value

TypeDescription
AnnotationRepositoryChange

An annotation change that a user makes.

|

Available values:

NameDescription
Addition

A user adds an annotation.

| | Deletion |

A user deletes an annotation.

| | Text |

A user edits annotation text.

| | Image |

A user changes an annotation image.

|

Remarks

The Change property can be set to the following values:

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

AnnotationRepositoryChangingEventArgs Class

AnnotationRepositoryChangingEventArgs Members

DevExpress.XtraCharts Namespace