Back to Devexpress

AnnotationImageEditingEventArgs Class

corelibraries-devexpress-dot-xtracharts-4086403a.md

latest3.2 KB
Original Source

AnnotationImageEditingEventArgs Class

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

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public sealed class AnnotationImageEditingEventArgs :
    AnnotationRepositoryChangingEventArgs
vb
Public NotInheritable Class AnnotationImageEditingEventArgs
    Inherits AnnotationRepositoryChangingEventArgs

Remarks

You can use AnnotationImageEditingEventArgs if the AnnotationRepositoryChanging event occurs after a user edits the image annotation. Cast AnnotationRepositoryChangingEventArgs to the AnnotationImageEditingEventArgs type in the AnnotationRepositoryChanging event handler. AnnotationImageEditingEventArgs exposes the NewImageFileName property, which contains a file path to the new annotation’s image.

The following example gets the file path to the new annotation image:

csharp
void chartControl1_AnnotationRepositoryChanging(object sender, AnnotationRepositoryChangingEventArgs e) {
    if (e.Change == AnnotationRepositoryChange.Image) {
    AnnotationImageEditingEventArgs imageEditingArgs = (AnnotationImageEditingEventArgs)e;
    string imageFile = imageEditingArgs.NewImageFileName;
    //Add your logic here. 
    }
 }
vb
Private Sub chartControl1_AnnotationRepositoryChanging(ByVal sender As Object, ByVal e As AnnotationRepositoryChangingEventArgs)
    If e.Change = AnnotationRepositoryChange.Image Then
        Dim imageEditingArgs As AnnotationImageEditingEventArgs = CType(e, AnnotationImageEditingEventArgs)
        Dim imageFile As String = imageEditingArgs.NewImageFileName
    End If
'Add your logic here.     
End Sub

Inheritance

Object EventArgs AnnotationRepositoryChangingEventArgs AnnotationImageEditingEventArgs

See Also

AnnotationImageEditingEventArgs Members

Annotations

DevExpress.XtraCharts Namespace