public void Dispose() { if (StockPriceDetails != null) { StockPriceDetails.Clear(); } }
public RenkoChartViewModel() { this.StockPriceDetails = new ObservableCollection <StockPrice>(); double[] points5 = { 28.77, 29.06, 28.52, 28.44, 28.64, 28.51, 28.56, 28.86, 28.95, 29.32, 29.21, 28.42, 28.5, 29.63, 28.8, 29.5, 29.63, 29.68, 29.83, 30.11, 29.7, 29.55, 28.65, 28.77, 29.06, 28.52,28.44, 28.64, 28.51, 28.56, 28.86, 28.95, 29.32, 29.21, 28.42, 28.5, 29.63, 28.8, 29.5, 29.63, 29.68, 29.83, 30.11, 29.7, 29.55, 28.65 }; DateTime date5 = new DateTime(2010, 3, 1); for (int day = 0; day < points5.Length; day++) { StockPriceDetails.Add(new StockPrice() { _Date = date5.AddDays(day), Price = points5[day] }); } }