Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Annotation.Content Property

Gets or sets the annotation content.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

#Declaration

public object Content { get; set; }

#Property Value

Type Description
Object

A Object value specifying the annotation content.

#Example

This example demonstrates how to bind a chart annotation to a content template.

To use the data template for annotation content, create a DataTemplate object defining how to represent annotation content and assign this template to the Annotation.ContentTemplate property.

<dxc:Annotation.Content>
    <local:AnnotationContent Text="Annotation"
                             ImageSource="{StaticResource imageSource}"/>
</dxc:Annotation.Content>
<dxc:Annotation.ContentTemplate>
    <DataTemplate>
        <StackPanel Orientation="Horizontal">
            <Label 
                   Margin="0,0,4,0" 
                   Content="{Binding Text}"/>
            <Image 
                   Width="48" 
                   Height="48">
                <Image.Source>
                    <BitmapImage UriSource="{Binding ImageSource}"/>
                </Image.Source>
            </Image>
        </StackPanel>
    </DataTemplate>
</dxc:Annotation.ContentTemplate>
See Also