A new PieProgressBar Control
Aucun commentaire
For the purposes of a recent production, I had to design a control named PieProgressBar. This class inherits RangeBase and as such has all the capabilities inherent in this type of control. It behaves in the end like any type ProgressBar control with a few more things. The hard part was to create dynamically pie in C #. Unlike WPF, Silverlight does not allow to override method to create new kinds of Shape. In other words, even if Shape is an abstract class, it is useless to inherit because the method of route design can not be overloaded.
The other technique is to use the "Path mini language" for creating geometric shapes in XAML. I had to use 3 segments with a ArcSegment to achieve this control. as I could not create primitive Pie for the designer in Blend, it took cunning ... The technique involves creating a pie chart dynamically when assigning a control part (ControlPart). Internally, the properties of filling the route generated, are related to properties of the control via a simple data binding created in C #.
You can see some examples below and download the library tweenedcontrols here.
Once the dll referenced, you can instantiate the control PieProgressBar in Blend through the Assets panel as shown below:
This component will probably be included as others in the CodePlex project SLExtensions. Thierry Bouquain updates it at this time and I welcome the move


