public OverlayedSlider(string overlayText, DoubleCollection ticks) { InitializeComponent(); tbOverlay.Text = overlayText; slValue.Minimum = ticks.First(); slValue.Maximum = ticks.Last(); slValue.Ticks = ticks; }
public SliderViewModel(int statIndex, int valueIndex, IEnumerable <double> ticks) { StatIndex = statIndex; ValueIndex = valueIndex; Ticks = new DoubleCollection(ticks); Minimum = Ticks.First(); Maximum = Ticks.Last(); _value = (float)Minimum; ShowSlider = Ticks.Count > 1; }
public SliderViewModel(int valueIndex, IEnumerable <int> ticks) { ValueIndex = valueIndex; var tickList = ticks.ToList(); Ticks = new DoubleCollection(tickList.Select(i => (double)i)); Minimum = Ticks.First(); Maximum = Ticks.Last(); _value = tickList.LastOrDefault(); ShowSlider = Ticks.Count > 1; }