1: using System;
2: using System.Net;
3: using System.Windows;
4: using System.Windows.Controls;
5: using System.Windows.Documents;
6: using System.Windows.Ink;
7: using System.Windows.Input;
8: using System.Windows.Media;
9: using System.Windows.Media.Animation;
10: using System.Windows.Shapes;
11: using System.Collections.ObjectModel;
12: using System.Collections.Generic;
13: using System.ComponentModel;
14:
15: namespace SLToolkitDemo
16: {
17: public class SalesData
18: {
19: public static ObservableCollection<Sale> GetData()
20: {
21: ObservableCollection<Sale> sales = new ObservableCollection<Sale>();
22:
23: sales.Add(new Sale() { ChartSaleCount = 100, ChartType = "Bar" });
24: sales.Add(new Sale() { ChartSaleCount = 73, ChartType = "Pie" });
25: sales.Add(new Sale() { ChartSaleCount = 12, ChartType = "Line" });
26: sales.Add(new Sale() { ChartSaleCount = 24, ChartType = "Spline" });
27:
28: return sales;
29: }
30: }
31:
32: public class Sale : INotifyPropertyChanged
33: {
34: private int _count;
35: public string ChartType { get; set; }
36: public int ChartSaleCount
37: {
38: get { return _count; }
39: set
40: {
41: _count = value;
42: NotifyPropertyChanged("ChartSaleCount");
43: }
44: }
45:
46: #region INotifyPropertyChanged Members
47:
48: public event PropertyChangedEventHandler PropertyChanged;
49:
50: public void NotifyPropertyChanged(string propertyName)
51: {
52: if (PropertyChanged != null)
53: {
54: PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
55: }
56: }
57: #endregion
58: }
59: }