Category: WPF

Adding labels to PieChart made with WPF Toolkit Charting Controls

WPF Toolkit Charting Controls is a dated assembly that allows to create line, bar, area, pie and column charts (it is possible to find an exhaustive and very tutorial on CodeProject about how to use it). It is a really ready to use tool, but sometimes it lacks some useful features.

In my case the pie chart does not allow to show labels with percentage on each pie area. It is a real pity.

Since each pie area is rendered by using a Geometry, my idea is to add something (i.e. another Geometry) to the one already computed. Areas are a handled by the PieDataPoint class. So we can get the Geometry computed by PieDataPoint, then add a new Geometry with the relative parcentage value and the use this new composition for drawing the area in the chart.

Continue reading “Adding labels to PieChart made with WPF Toolkit Charting Controls”

A delayed EventTrigger for Caliburn Micro

EventTriggers in Calibur Micro are reposible for executing actions. Sometimes (think of a search box that calls the server, you’d want it to execute only if the user paused for a split second and not for every key stroke) can be useful having an EventTrigger which executes an action after a while.

Continue reading “A delayed EventTrigger for Caliburn Micro”