You seem to be somewhat confused between an AttachedProperty
and a DependencyProperty
. Forget about your ChartEntriesSource
class... instead, adding this DependencyProperty
into your ChartView
control should do the trick:
public static readonly DependencyProperty ChartEntriesProperty = DependencyProperty.
Register("ChartEntries", typeof(ObservableCollection<ChartEntry>), typeof(ChartView));
public ObservableCollection<ChartEntry> ChartEntries
{
get { return (ObservableCollection<ChartEntry>)GetValue(ChartEntriesProperty); }
set { SetValue(ChartEntriesProperty, value); }
}