0

I am trying to port my Xamarin app to MAUI. It has an view with some border elements for the header and a carouselview element in the middle to display some images. After some recoding i have it working and displaying it nice for android but it looks totally messed up for iOS. When i try to fix it for iOS it destroys the android layout. So for that specific page i want to create a separate view for iOS. I use the AppShell. What is the best way to do this?

For the time being, until MAUI is more stable, consistent, i think this is the best way to go.

Thanks in advance!

Nick
  • 71
  • 1
  • 7
  • 1
    Does this answer your question? [.NET MAUI: can we also have platform-specific XAML?](https://stackoverflow.com/questions/74815868/net-maui-can-we-also-have-platform-specific-xaml). NOTE: Please search before asking. This previous discussion was easy to find. First hit in https://www.google.com/search?q=maui+xaml+platform+specific – ToolmakerSteve Jul 14 '23 at 21:47
  • I had found that page, but that was not what i was searching for. Those suggestions feel like workarounds. I had hoped there was a way to use the platform specific folder and that the correct XAML file is used at compile time, not at runtime. – Nick Jul 19 '23 at 09:44
  • Interesting idea, but does not exist. XAML files (almost always) have little (if any) platform-specific logic. So there has been no demand for such a feature. When customization is needed, C# code-behind is much more flexible anyway. Granted, c# is run-time, but that's a non-issue: there is neither a memory nor a performance concern here. – ToolmakerSteve Jul 19 '23 at 18:38
  • Thanks for the clarification. Than i have to do it at runtime. It's 'sad' because of the state MAUI is in. There is a lot of platform specific tuning needed in the xaml files for making an app looking the same on different platforms. And to keep the project more clean/maintainable the platform folder would have been nice. I don't think runtime will impact performance that much. – Nick Jul 20 '23 at 06:57

0 Answers0