Skip to main content

Microsoft Silverlight

Answered Question Why are Charting Series/Axis derived from Control and not something like DO or FrameworkElement?RSS Feed

(0)

Phil Wright
Phil Wright

Member

Member

12 points

9 Posts

Why are Charting Series/Axis derived from Control and not something like DO or FrameworkElement?

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
David Anson

Participant

Participant

1718 points

212 Posts

Microsoft
Answered Question

Re: Why are Charting Series/Axis derived from Control and not something like DO or FrameworkElement?

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!


http://blogs.msdn.com/delay

This posting is provided "AS IS" with no warranties, and confers no rights.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities