public DigitLoopingSelector() { this.Loaded += (obj, args) => { DataSource = new DigitDataSource(MinValue, MaxValue, Step, DefaultValue, StringFormat); DataSource.SelectionChanged += (obj1, arg1) => { this.SelectedItem = Convert.ToInt32(arg1.AddedItems[0]); }; }; }