Description
I'm submitting a...
- Feature request
Current behavior
Currently some classes in Uno.UI are using reflection to access classes in the toolkit and interact with them. This is not extensible, and in some cases the dependency can be inverted.
For instance Android's NativeFramePresenter seek for the CommandBarExtensions https://github.com/nventive/Uno/blob/master/src/Uno.UI/NativeFramePresenter.Android.cs#L28 in order to update the visibility of the back button (https://github.com/nventive/Uno/blob/master/src/Uno.UI/NativeFramePresenter.Android.cs#L81).
Expected behavior
No cross-layer dependencies.
For the example above, the CommandBar could instead walk the tree to discover the Frame and register to the history change events to update the visibility by itself.
Minimal reproduction of the problem with instructions
N/A
Environment
Nuget Package: Uno.UI Package Version(s): irrelevant
Affected platform(s):
- iOS
- Android
- WebAssembly
- Windows
- Build tasks
Visual Studio: irrelevant Relevant plugins: none