Closed jahu00 closed 1 year ago
DI in MAUI is not quite what I expected, but I can access services using
Handler.MauiContext.Services.GetService()
If I used MVVM, I could probably use DI through constructor inside model class.
However I didn't find the services I was expecting to (namely IFontCollection
). To give SKCanvasView a fighting chance I need to figure out hot to read resources from assembly.
I need to access resources (such as IFontCollection for fonts) and MauiApp is some kind of host class, but I have no idea how to access services from inside my of control.