This project is read-only.

Styleable/Templateable PointMarker

Jan 19, 2009 at 4:48 AM
I'm interested in applying a ControlTemplate to a PointMarker, I'm pretty sure this doesn't work 'out of the box' so I have a couple of options.

1) Use the DelegatePointMarker and in the callback create a control with the relevant ControlTemplate, and place it at the coordinates provided
2) Implement a ControlPointsGraph : PointsGraphBase class that will place a control at each point

I'm liking option two, but option 1 is less code, and I don't want to crash with any of your enhancements. Thoughts?

Jan 19, 2009 at 7:37 PM
Hi, Ian!

You are right, currently DynamicDataDisplay cannot create markers from their template. This will be definitely added in one of next releases.
It seems to me that it is not very comfortable to use DelegatePointMarker because it draws marker contents by using low-level GraphicsContext, which is not very compatible with templates. Maybe you should create a subclass of ElementPointMarker and use it on MarkerElementPointGraph (the difference between ElementPointMarker and PointMarker is that PointMarker uses DrawingContext to draw a marker and ElementPointMarker uses a UIElement as marker).

This part of DynamicDataDisplay will be improved in near future.

Mikhail Brinchuk,
Dynamic Data Display Dev Team.