We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 217aae0 commit dab4e33Copy full SHA for dab4e33
src/ReactiveUI.Plugins.Popup/ReactivePopupPage.cs
@@ -37,9 +37,15 @@ public abstract class ReactivePopupPage<TViewModel> : PopupPage, IViewFor<TViewM
37
protected ReactivePopupPage()
38
{
39
BackgroundClick =
40
- Observable
41
- .FromEventPattern(x => BackgroundClicked += x, x => BackgroundClicked -= x)
42
- .Select(x => Unit.Default);
+ Observable.FromEvent<EventHandler, Unit>(
+ handler =>
+ {
43
+ void EventHandler(object sender, EventArgs args) => handler(Unit.Default);
44
+ return EventHandler;
45
+ },
46
+ x => BackgroundClicked += x,
47
+ x => BackgroundClicked -= x)
48
+ .Select(_ => Unit.Default);
49
}
50
51
/// <summary>
0 commit comments