Комментарии:
Great video!
How to implement one similar code for like 3 platforms and a different code only for a single platform?
e.g. one specific code for Android but another same similar code for Windows, iOS and Mac? (without copying same code to each of those 3 platform folders)
Is this approach changed at all if I use a maui shell application? If so, how can I make adjustments to use dependency injection for writing platform-specific code?
ОтветитьVery nice and clean. I am currently migrating an Xamarin app to MAUI and I felt a bit repulsed by Microsoft's docs regarding 'partial method' approach. Maybe one thing worth mention - I think that in your example `AddSingleton` instead of `AddTransient` could be used. This is very small improvement but you could save some GC time by having this :)
ОтветитьHi
You have injected main page reference to MainPage class member if App class. How can i chain up in appshell
Absolute gold man! Thank you very much
Ответить.
ОтветитьThanks
ОтветитьHi,
Thank you!
I have created a Maui class library with a service and platform implementation,
(because I need it in multiple apps)
How do I add the class library to my Maui project to be able to add the service?
I have a problem when try to usebuilder.Services.AddTransient<>, when I try to do the dependency injection MAUI does not detect Platforms, so it is impossible to make the call with the interface,
ОтветитьI could use a video on how to create a cross platform control.
ОтветитьI replicated what you did but it throws an error saying that my class already has definition on other platform :(
ОтветитьI keep getting issues with the same class on the different platforms.
Also tested with the code from this video, create a DeviceOrientationService on Windows platform:
The namespace 'MauiPlatformCodeDISample.Platforms' already contains a definition for 'DeviceOrientationService' MauiPlatformCodeDISample
How do you handle this?
Nice example. Thank you
ОтветитьGreat video. Can i deploy maui app to iphone without have Mac? (i use Windows and deploy to iphone directly)?
ОтветитьLike! Do you fiddle that out on your own... or do you get some quick briefings/ intros/ help?
ОтветитьGreat example! Very big fan of the cleanliness of Dependency Injection! It is so good in .Net 6, Blazor and Maui.
ОтветитьI like this version more.
As an extension to this, I would like to figure out how to make windows/mac targets fullscreen either with some command or on launch.
Thank you for sharing so much!
Great video thank you !
ОтветитьHmm, I like this method. Nice and clean. Well done Gerald.
ОтветитьGreat 🙌🏻
Ответить