I'm currently creating a user interface using WPF and would like to display a pie-chart on my window. As far as I can see, this will involve creating a custom control - it is not a scenario in which applying styling or templating to an existing control will be sufficient. I've read several articles on custom controls and all of those which provide a detailed description seem to use very different methods.
Different authors derive their custom control classes from, among others, Control, UserControl or Canvas. Rendering is done in several places, including in OnRender and OnApplyTemplate, using one of several different methods: DrawingVisual, GeometryDrawing or Shape. There seem to be so many different ways of simply putting a few shapes on the screen that I am now very confused.
All I'm looking to achieve is a simple pie-chart, exposing an event which is raised whenever one of the wedges of the pie is clicked.
Is there a generally agreed "best" way to go about this?