Hello,
In MAUI, You could use the OnPlatform
mark-up extension to set platform-specific values in XAML.
For Example, I have a FlexLayout
, and I want to show the items horizontally on Windows and vertically on other platforms:
<FlexLayout Direction="{OnPlatform WinUI=Row, iOS=Column, Android=Column}">
...
</FlexLayout>
If you think it will work for you, you could refer to this official course Platform-specific values in XAML to get more details.
I've used Onplatform
to implement the display effect you show in the text.pdf
, you could refer to the following code in the file:
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.