Reactive extensions for Eto.Forms (adds observables for Eto events.)
Example usage:
Instead of
var txt = new TextBox();
txt.KeyUp += (s, e) => {
if(e.KeyData != (Keys.Control | Keys.C)) return;
Console.WriteLine("'Control + C' was pressed");
};
you can do:
var txt = new TextBox();
txt.Events().KeyUp
.Select(k => k.KeyData)
.Where(k => k == (Keys.Control | Keys.C))
.Subscribe(k => Console.WriteLine("'Control + C' was pressed"));
Generated using ReactiveUI EventBuilder
- Copy Eto.Rx.cs file to your project.
- Add
Eto.Forms
andSystem.Reactive.Linq
nugets to your project