views:

22

answers:

1

I'm starting to design a custom control with rather complex drawing. It will be a kind of chart (a kind of radar chart). It will be composed of a few axises with labels, line-regions (like spider-network) and filled shapes.

The main question is what's the difference between using Path control and Polygon control? What's better to use here?

The goal is to prepare control with minimal amount of c# and try to do as much as possible in xaml / binding. The next important requirement is that control should resize to parent containers' width - if possible without any long recalulations in c#.

+1  A: 

A polygon represents a single polygon. However a path can be composed of a collection of geometries. A path can include Rectangles, Ellipis, mutliple Polygons etc.

In a typical radar chart you would have a polygon presenting the value area of the chart.

How long do you expect the re-calculations to really take? Go with the simple but correct solution first. Find out whether you calculations really are long and whether that really is a performance problem, first. I suspect not.

AnthonyWJones