Back to Devexpress

CrosshairOptionsBase.PopupTemplate Property

wpf-devexpress-dot-xpf-dot-charts-dot-crosshairoptionsbase-b9e97ff6.md

latest2.7 KB
Original Source

CrosshairOptionsBase.PopupTemplate Property

Gets or sets the template of the Crosshair label’s popup panel.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public DataTemplate PopupTemplate { get; set; }
vb
Public Property PopupTemplate As DataTemplate

Property Value

TypeDescription
DataTemplate

The label popup template.

|

Remarks

A CrosshairSeriesLabelItem object is the data context for this template.

The image below demonstrates the Crosshair Cursor with a custom transparent popup template used in the example.

Example

This example demonstrates how to customize the Crosshair Label.

The CrosshairOptionsBase.PopupTemplate property used in this example allows you to fully customize the Crosshair Label appearance.

View Example

xaml
<dxc:ChartControl.CrosshairOptions>
    <dxc:CrosshairOptions>
        <dxc:CrosshairOptions.PopupTemplate>
            <DataTemplate>
                <Border Background="#C0FFFFFF" 
                        BorderBrush="#C0C0C0C0" 
                        BorderThickness="1"
                        Padding="16">
                    <ItemsControl ItemsSource="{Binding PresentationData}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <ContentPresenter Content="{Binding}" 
                                                  ContentTemplate="{Binding Path=CrosshairSeriesLabelTemplate}"/>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </Border>
            </DataTemplate>
        </dxc:CrosshairOptions.PopupTemplate>
    </dxc:CrosshairOptions>
</dxc:ChartControl.CrosshairOptions>

See Also

CrosshairOptionsBase Class

CrosshairOptionsBase Members

DevExpress.Xpf.Charts Namespace