Skip to main content

AnnotationTextEditingEventArgs Class

Data for the ChartControl.AnnotationRepositoryChanging event that occurs when the text annotation is edited.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

public sealed class AnnotationTextEditingEventArgs :
    AnnotationRepositoryChangingEventArgs

Remarks

You can use AnnotationTextEditingEventArgs if the AnnotationRepositoryChanging event occurs after a user edits the text annotation. Cast the AnnotationRepositoryChangingEventArgs to the AnnotationTextEditingEventArgs type in the AnnotationRepositoryChanging event handler. AnnotationTextEditingEventArgs exposes the NewText property, which contains the new annotation’s text.

The following example gets the new annotation’s text:

void chartControl1_AnnotationRepositoryChanging(object sender, AnnotationRepositoryChangingEventArgs e) {
  if (e.Change == AnnotationRepositoryChange.Text) {
      AnnotationTextEditingEventArgs textEditingArgs = (AnnotationTextEditingEventArgs)e;
      string newAnnotationText = textEditingArgs.NewText;
      //Add your logic here. 
  }    
}

Inheritance

See Also