/// <summary> /// Initializes a new instance of the ISeriesHost class. /// </summary> public Chart() { DefaultStyleKey = typeof(Chart); // Create the backing collection for Series ObservableCollection <Series> series = new NoResetObservableCollection <Series>(); series.CollectionChanged += new NotifyCollectionChangedEventHandler(OnSeriesCollectionChanged); _series = series; _seriesCollectionSeriesContainerAdapter.Collection = series; // Create the backing collection for Axes ObservableCollection <IAxis> axes = new NoResetObservableCollection <IAxis>(); axes.CollectionChanged += new NotifyCollectionChangedEventHandler(OnAxesCollectionChanged); _axes = axes; ObservableCollection <IAxis> actualAxes = new ObservableCollection <IAxis>(); actualAxes.CollectionChanged += new NotifyCollectionChangedEventHandler(ActualAxesCollectionChanged); this.InternalActualAxes = actualAxes; this.ActualAxes = new ReadOnlyCollection <IAxis>(InternalActualAxes); _gridLinesContainerChildrenChartAreaAdapter.Collection = _gridLinesContainerChildren; // Create collection for LegendItems AggregatedObservableCollection <UIElement> chartLegendItems = new AggregatedObservableCollection <UIElement>(); _legendChildrenLegendAdapter.Collection = chartLegendItems; LegendItems = chartLegendItems; ISeriesHost host = this as ISeriesHost; host.GlobalSeriesIndexesInvalidated += OnGlobalSeriesIndexesInvalidated; // Create style dispenser StyleDispenser = new StyleDispenser(); }
/// <summary> /// Initializes a new instance of the Series class. /// </summary> protected Series() { LegendItems = new NoResetObservableCollection <UIElement>(); }
/// <summary> /// Initializes a new instance of the ISeriesHost class. /// </summary> public Chart() { DefaultStyleKey = typeof(Chart); // Create the backing collection for Series ObservableCollection<Series> series = new NoResetObservableCollection<Series>(); series.CollectionChanged += new NotifyCollectionChangedEventHandler(OnSeriesCollectionChanged); _series = series; _seriesCollectionSeriesContainerAdapter.Collection = series; // Create the backing collection for Axes ObservableCollection<IAxis> axes = new NoResetObservableCollection<IAxis>(); axes.CollectionChanged += new NotifyCollectionChangedEventHandler(OnAxesCollectionChanged); _axes = axes; ObservableCollection<IAxis> actualAxes = new ObservableCollection<IAxis>(); actualAxes.CollectionChanged += new NotifyCollectionChangedEventHandler(ActualAxesCollectionChanged); this.InternalActualAxes = actualAxes; this.ActualAxes = new ReadOnlyCollection<IAxis>(InternalActualAxes); _gridLinesContainerChildrenChartAreaAdapter.Collection = _gridLinesContainerChildren; // Create collection for LegendItems AggregatedObservableCollection<UIElement> chartLegendItems = new AggregatedObservableCollection<UIElement>(); _legendChildrenLegendAdapter.Collection = chartLegendItems; LegendItems = chartLegendItems; ISeriesHost host = this as ISeriesHost; host.GlobalSeriesIndexesInvalidated += OnGlobalSeriesIndexesInvalidated; // Create style dispenser StyleDispenser = new StyleDispenser(); }
/// <summary> /// Initializes a new instance of the Series class. /// </summary> protected Series() { LegendItems = new NoResetObservableCollection<object>(); }
/// <summary> /// Initializes a new instance of the Series class. /// </summary> protected Series() { LegendItems = new NoResetObservableCollection <object>(); }
/// <summary> /// Initializes a new instance of the Series class. /// </summary> protected Series() { LegendItems = new NoResetObservableCollection<UIElement>(); }