Changes
/* Device and Platform Responsiveness */
{{UnderConstructionStart}}
<br>
Although '''OnPlatform''' and '''OnIdiom''' have been are used in Xamarin, the following wiki article is valid from MAUI 5.0 (add version flag), as the syntax changed.
'''OnPlatform''' can be used to define different property values based on the platform. Valid Platform names are:
* iOS
* Android
* WinUI (for MAUI Windows)
* further ones see [https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/customize-ui-appearance?view=net-maui-9.0#customize-ui-appearance-with-a-markup-extension-based-on-the-platform here]
<br>
'''OnIdom''' can be used to define different property values based on the device type (e.g. Phone, Tablet, Desktop).
When it comes to the proper syntax, we should stick with the approaches mentioned in the [https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/customize-ui-appearance?view=net-maui-9.0 official documentation].
Means, we should '''avoid ''' using the single-tag syntax like in the example below:
<tabs>
<tab name="OnPlatform">
</tabs>
Instead, we should either use the OnPlatform / OnIdiom '''multi-tag syntax''' (or the '''inline syntax''' for OnPlatform / OnIdiom. ==== Multi-tag syntax ====Here it is mandatory to add '''x:TypeArguments="TheType"''' with the proper type to OnPlatfrom/OnIdiom. ''Default="..."'' only if necessary):is optional.
<tabs>
<tab name="OnPlatform">
</tabs>
<tabs>
<tab name="OnPlatform">
</tabs>
<tabs>
<tab name="Don't">
<source lang = "XML">
Margin="{OnIdiom 10,2, Phone=2,0}"
</source>
</tab>
<tab name="Instead do">
<source lang = "XML">
Margin="{OnIdiom '10,2', Phone='2,0'}"
</source>
</tab>
</tabs>
{{Attention|Unreliable Support: When Behavior may vary when using bindings or complex resources, behavior may vary across platforms. Although it seems to work with the inline syntax according to our experiences, it is recommended to test these edge cases thoroughly.}}
{{UnderConstructionEnd}}
