public static IDisposable Bind(this UISwitch uiSwitch, ISubject <bool> subject) { return(uiSwitch .ValueChangedStream() .Bind( subject, x => { Debug.WriteLine($"Setting switch to {x}"); uiSwitch.On = x; } )); }