Popup support for dependency injection #405
Closed
Vroomer
started this conversation in
New Feature Discussions
Replies: 2 comments 1 reply
-
You can resolve the services by creating some extension method to |
Beta Was this translation helpful? Give feedback.
1 reply
-
Closed as per the Community Stand-up discussion here: https://youtu.be/N9wMcBP4jtg?t=2889 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to implement popup with ViewModel that has dependance on several services. Unfortunately
public static void ShowPopup<TPopup>(this Page page, TPopup popup)
doesn't utilize Maui dependency injection. I thought about resolving the Popup with ServiceProvider first, but that brings a problem of providing the Popup constructor with anchor parameter. It would be great if ShowPopup method could be provided with type of Popup and resolve the Popup using Maui dependency injection on its own, including option to provide anchor as a parameter. If you know other way to achieve this, I will be glad for you suggestions.Beta Was this translation helpful? Give feedback.
All reactions