Windows Presentation Framework (WPF) is the latest User Interface framework from Microsoft. With WPF comes a radical departure from its predecessor WinForms. Some of the key features of WPF are a rich content model, which allows the developer to change or enhance the visual appearance of any user interface element, styles, which provide the tools to create a ‘skinnable’ interface, and a highly flexible data binding framework which allows the developer to connect together almost any property of their user interface with the data model it represents.
This article describes the development of a custom pie chart control. While there are a few other WPF pie chart controls available on the internet, none of them take full advantage of the WPF data binding framework. What this means to the developer is that it is their responsibility to detect when the data being plotted is changed, ‘shunting’ this information between their underlying data model, and the pie chart. The article describes how data binding can be employed to keep the pie chart synchronised with the underlying data, whilst enhancing the interactivity of the control. Along the way, other topics are touched on, such as data binding within tooltips and the development of custom shapes.
Read the full article at Code Project