void LogEvents(Slider control) { control.ValueChanged += delegate { Log.Write(control, "ValueChanged, Value: {0}", control.Value); }; }
Slider SetInitialValue () { var control = new Slider{ MinValue = 0, MaxValue = 1000, TickFrequency = 100, Value = 500 }; LogEvents(control); return control; }
Control Default() { var control = new Slider(); LogEvents(control); return control; }
/// <summary> /// Raises the value changed event. /// </summary> public void OnValueChanged(Slider widget, EventArgs e) { widget.Platform.Invoke(() => widget.OnValueChanged(e)); }
protected virtual void LogEvents(Slider control) { control.ValueChanged += delegate { Log.Write(control, "ValueChanged"); }; LogEvents((Control)control); }
Control SliderControl() { var control = new Slider(); LogEvents(control); return control; }