I am a passionate mobile app and software developer with a focus on C# .NET, Xamarin.Forms and .NET MAUI.
awesome freelance application development projects
Sorry for the late reply, I always miss the notifications. You can place an image in the header of the control and use DataTriggers with a binding to the IsExpanded property. Inside the triggers you can then define setters that change the Source property of the image based on the value of the IsExpanded property. Hope this helps.
Hi Renatas, sorry, I only saw your comment now. Not sure what exactly you mean. In the sample repository, the AudioService isn't implemented, yet, it doesn't use the Singleton Design (anti-) Pattern. I just want to demonstrate different ways to register and use dependencies. What matters most is that the SOLID principles are applied wherever possible. Now, the code in the samples repository isn't perfect, it's a showcase of possibilities. Generally, any service with a public @ Object or factory method can be registered as a singleton, transient or scoped dependency. Note that the term "singleton" is somewhat overloaded here, because in the context of dependency injection, it means that always the same instance will be resolved by the DI container, it doesn't mean the Singleton Design Pattern (SDP). Classes that use the SDP can still also be registered as a singleton dependency, in which case you don't register the @ Object (because it's private) or a factory (because it doesn't exist), but rather the static singleton instance. I hope this clears it up a little. Cheers Julian
Hi Sebastian. Sorry, I didn't see your comment before. Have you tried using data binding to change the color during runtime? Another approach would be to build the toolbar in the code-behind using C# and then setting different colors based on some conditions. As I am not near my computer at the moment, I won't be able to give a specific answer at the moment. If you can't figure it out, let me know and I might write up another blog post about configuring/updating the toolbar from the code-behind during runtime. Cheers Julian
Hi Sebastian Hoppe , popups such as alert dialogs and the picker use native platform views. In order to theme those, you need to use platform-specific code. This can be achieved either by using custom renderers (the old-fashioned Xamarin.Forms way) , control customization using handlers and mappers or by manually setting color values in the styles.xml of the Android platform, similar to how I have described it in my blog post about splash screens in MAUI . I hope this helps. Cheers Julian
Hi Sebastian Hoppe , which background do you mean? On the top, you can see the status bar, which on Android can be set in the platform-specific code, e.g. MainActivity.cs via this method: Window?.SetStatusBarColor(Colors.Orange.ToAndroid()); On iOS, this shouldn't be necessary, usually the page background color is used, which can be set in a platform-independent fashion like this: < ContentPage BackgroundColor = "Orange" > </ ContentPage > I hope this helps. I'm thinking about writing a separate blog post about that. Cheers Julian
Maxi Contieri I'm not questioning your opinion, I already acknowledged that it has merit in my first comment. What's your proposal, though? How should we proceed? Introduce massive breaking changes into all existing software? Use entirely new programming languages and rewrite everything? I don't think that changing this is realistic or needed. Once you're used to it, the cognitive load gets less. At least that's the case for me, I cannot speak for every software developer. I appreciate your blog post, because it does question things as they are being done and shines a light on the cognitive difficulties this produces (at least for some people, especially beginners).