// Divide the time span by 20 to set the slider intervals //double timeInterval = timeSpan.TotalDays; double timeInterval = timeSpan.TotalDays / 20; DateTime dt = timeExtent.Start; for (int i = 0; i < 20; i++) { intervals.Add(dt); dt = dt.AddDays(timeInterval); } MyTimeSlider.Intervals = intervals;
this.MapControl.TimeExtent = new TimeExtent(timeExtent.Start, timeExtent.Start.AddDays(timeInterval * 4)); }