Back to Devexpress

ChartControl.AnnotationRepositoryChanged Event

windowsforms-devexpress-dot-xtracharts-dot-chartcontrol-183e5ca8.md

latest3.6 KB
Original Source

ChartControl.AnnotationRepositoryChanged Event

Occurs after a user adds, edits or deletes an annotation.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.UI.dll

NuGet Package : DevExpress.Win.Charts

Declaration

csharp
public event AnnotationRepositoryChangedEventHandler AnnotationRepositoryChanged
vb
Public Event AnnotationRepositoryChanged As AnnotationRepositoryChangedEventHandler

Event Data

The AnnotationRepositoryChanged event's data class is AnnotationRepositoryChangedEventArgs. The following properties provide information specific to this event:

PropertyDescription
AnnotationReturns the changed annotation.
ChangeReturns the AnnotationRepositoryChange value that indicates the type of change a user makes.

Remarks

Users can utilize the Add Text Annotation and Add Image Annotation buttons in the Chart’s Ribbon or Toolbars to add interactive annotations. They can also edit or delete an annotation if the Annotation.RuntimeEditing property is set to true.

The e.Change property returns an operation that a user performs. The Change property can be set to the following values:

The e.Annotation property returns the changed annotation.

The following example gets a type of the annotation change and the annotation object:

csharp
void chartControl1_AnnotationRepositoryChanged(object sender, AnnotationRepositoryChangedEventArgs e) {
  AnnotationRepositoryChange lastChange = e.Change;
  Annotation myAnnotation = e.Annotation;
  //Add your logic here. 
}
vb
Private Sub chartControl1_AnnotationRepositoryChanged(ByVal sender As Object, ByVal e As AnnotationRepositoryChangedEventArgs)
  Dim lastChange As AnnotationRepositoryChange = e.Change
  Dim myAnnotation As Annotation = e.Annotation
  'Add your logic here. 
End Sub

See Also

AnnotationRepositoryChanging

ChartControl Class

ChartControl Members

DevExpress.XtraCharts Namespace