Skip to main content
A newer version of this page is available. .

Annotation.Content Property

Gets or sets the annotation content.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v19.1.dll

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>

The following code snippets (auto-collected from DevExpress Examples) contain references to the Content property.

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.

See Also