Back to Devexpress

AnnotationCollection.AddImageAnnotation(String, DXImage) Method

corelibraries-devexpress-dot-xtracharts-dot-annotationcollection-dot-addimageannotation-x28-system-dot-string-devexpress-dot-drawing-dot-dximage-x29.md

latest2.5 KB
Original Source

AnnotationCollection.AddImageAnnotation(String, DXImage) Method

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public ImageAnnotation AddImageAnnotation(
    string name,
    DXImage image
)
vb
Public Function AddImageAnnotation(
    name As String,
    image As DXImage
) As ImageAnnotation

Parameters

NameType
nameString
imageDXImage

Returns

Type
ImageAnnotation

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AddImageAnnotation(String, DXImage) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-chart-accompany-chart-elements-by-text-or-image-annotations/VB/AnnotationsSample/Form1.vb#L28

vb
' Now, create an image annotation, and add it to the chart's collection.
chartControl1.Annotations.AddImageAnnotation("Annotation 2", DXImage.FromStream(New FileStream("...\...\image.png", FileMode.Open, FileAccess.Read, FileShare.Read)))
' Define the X and Y absolute coordinates for the annotation, in pixels.

See Also

AnnotationCollection Class

AnnotationCollection Members

DevExpress.XtraCharts Namespace