使用OnPlatform->On标签的样式: 登录后复制 <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="..."> <ContentPage.Padding> <OnPlatform x:TypeArguments="Thickness"> <On Platform="iOS, Android" Value="10, 20, 20, 10" /> </OnPlatform> </ContentPage.Padding> ... </ContentPage> 1.2.3.4.5.6.7.8.9.10. 作者:꧁执笔小白꧂ 原创作者: u_16822845 转载于: https://blog.51cto.com/u_16822845/11651029