Skip to main content

CustomMarker2DModel.PointTemplate Property

Specifies the point template for the point marker’s custom model. This is a dependency property.

Namespace: DevExpress.Xpf.Charts

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

NuGet Package: DevExpress.Wpf.Charts

Declaration

public ControlTemplate PointTemplate { get; set; }

Property Value

Type Description
ControlTemplate

A ControlTemplate object.

Remarks

You can implement a custom marker model for 2D series that support marker models. Follow the steps below to create a custom marker model:

  • Assign a CustomMarker2DModel object to the MarkerModel property.
  • Create a ControlTemplate with visual elements.
  • Assign this template to the CustomMarker2DModel.PointTemplate property.
<Window.Resources>
        <ResourceDictionary>
            <dxc:BrushOverlayConverter x:Key="brushOverlayConverter" />
        </ResourceDictionary>
</Window.Resources>
...
    <dxc:LineSeries2D Name="xLineSeries2D" DataSource="{Binding Data}" 
                    ArgumentDataMember="Argument"
                    ValueDataMember="Value"
                    MarkerSize="22"
                    MarkerVisible="True">
        <dxc:LineSeries2D.MarkerModel>
            <dxc:CustomMarker2DModel>
                <dxc:CustomMarker2DModel.PointTemplate>
                    <ControlTemplate>
                    <Grid Background="Transparent" >
                            <Ellipse Fill="CornflowerBlue" Opacity="0.5" />
                            <Ellipse Stroke="{Binding Path=PointColor, ConverterParameter=Gray, Converter={StaticResource brushOverlayConverter}}" StrokeThickness="2" />
                            <Ellipse Stroke="{Binding Path=PointColor, ConverterParameter=Gray, Converter={StaticResource brushOverlayConverter}}" StrokeThickness="2" Margin="4" />
                            <Ellipse Fill="Red"  Margin="8" />
                    </Grid>
                    </ControlTemplate>
                </dxc:CustomMarker2DModel.PointTemplate>
            </dxc:CustomMarker2DModel>
        </dxc:LineSeries2D.MarkerModel>
    </dxc:LineSeries2D>

Result:

Custom marker model

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PointTemplate 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