Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Why are Charting Series/Axis derived from Control and not something like DO or FrameworkElement?
1 replies. Latest Post by David Anson on April 27, 2009.
(0)
Phil Wright
Member
12 points
9 Posts
04-25-2009 10:02 AM |
Looking at the source code for the excellent Chart control I notice that the base class for the Axis and Series components is Control. This is odd to me as neither of them actually has a visual representation and instead represent definitions to be used by the chart. Why are they not derived from the lighter weight DependancyObject or FrameworkElement?
David Anson
Participant
1718 points
212 Posts
04-27-2009 6:22 PM |
Thanks, Phil!
If you look a little closer, you'll see that Series actually does have an on-screen representation - check out DataPointSeries.xaml. Note that you *could* change the appearance of the Series's PlotArea there. But more generally, the Series subclasses (and Axis ones) are specifically intended to both have default Templates and Styles (the Template property first shows up on Control, BTW) so users can customize their appearance and also so they can easily and extensibly contain other controls.
Hope this helps!