You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
difficulty/starter 🚀Categorizes an issue for which the difficulty level is reachable by newcomerskind/bugSomething isn't workingproject/navigation-lifecycle 🧬Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
Uno's FlyoutBase.Opening, FlyoutBase.Opened and FlyoutBase.Closed events have the EventHandler signature, while UWP's FlyoutBase have EventHandler<object>.
Expected behavior
Though you can discuss the poor design decision of choosing EventHandler<object>, Uno should have followed that signature.
How to reproduce it (as minimally and precisely as possible)
Create a new Uno application
Add a MenuFlyout somewhere.
Handle the Opening event with Observable.FromEventPattern
Observable
.FromEventPattern<object>(
h => myMenu.Opening += h,
h => myMenu.Opening -= h)
.Subscribe(_ => { });
Compile for all platforms
Result: It only compiles for UWP. On other platforms, you get error CS0029: Cannot implicitly convert type 'System.EventHandler' to 'System.EventHandler'.
difficulty/starter 🚀Categorizes an issue for which the difficulty level is reachable by newcomerskind/bugSomething isn't workingproject/navigation-lifecycle 🧬Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
Activity
jeromelaban commentedon Jan 4, 2020
Thanks Martin :) That's indeed not a discussion we're having 😂 I'll add reference this issue in #2240 that will be used to adjust signatures.
In the meantime, the
HAS_UNOdefine can be used to discriminate APIs in user code.Youssef1313 commentedon Oct 16, 2021
Fixed in 1ab5f89.
@jeromelaban @ebariche Can we close?