All docs
V21.2
21.2
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Legend.ItemTemplate Property

Gets or sets a data template that specifies how to display an item in the legend.

Namespace: DevExpress.Xpf.TreeMap

Assembly: DevExpress.Xpf.TreeMap.v21.2.dll

Declaration

public DataTemplate ItemTemplate { get; set; }

Property Value

Type Description
DataTemplate

Specifies how to display an item in the legend.

Remarks

Specify the Legend.ItemTemplate property to configure legend item appearance.

The following example shows how to display circular markers instead of rectangular markers in the legend:

Circular legend markers

<dxtm:TreeMapControl.Legend>
    <dxtm:Legend HorizontalPosition="Center" VerticalPosition="BottomOutside" 
                 Margin="10" Height="80"  Padding="4" Direction="TopToBottom" 
                 BorderBrush="DarkGray" BorderThickness="1">
        <dxtm:Legend.Title>
            <dxtm:LegendTitle Content="Field of Activity" FontSize="14" FontWeight="Bold"/>
        </dxtm:Legend.Title>
        <dxtm:Legend.ItemTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <Ellipse Width="10" Height="10" Fill="{Binding Brush}" Margin="2,0"/>
                    <TextBlock Text="{Binding Text}"/>
                </StackPanel>
            </DataTemplate>
        </dxtm:Legend.ItemTemplate>
    </dxtm:Legend>
</dxtm:TreeMapControl.Legend>
See Also