corelibraries-devexpress-dot-xtracharts-b42f5ceb.md
Data for the ChartControl.AnnotationRepositoryChanging event that occurs when the text annotation is edited.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
public sealed class AnnotationTextEditingEventArgs :
AnnotationRepositoryChangingEventArgs
Public NotInheritable Class AnnotationTextEditingEventArgs
Inherits AnnotationRepositoryChangingEventArgs
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.
}
}
Private Sub chartControl1_AnnotationRepositoryChanging(ByVal sender As Object, ByVal e As AnnotationRepositoryChangingEventArgs)
If e.Change = AnnotationRepositoryChange.Text Then
Dim textEditingArgs As AnnotationTextEditingEventArgs = CType(e, AnnotationTextEditingEventArgs)
Dim newAnnotationText As String = textEditingArgs.NewText
'Add your logic here.
End If
End Sub
Object EventArgs AnnotationRepositoryChangingEventArgs AnnotationTextEditingEventArgs
See Also