Xaml(.Net Maui)中的OnPlatform字符串是什么



我有一个毛伊岛应用程序,想根据我所在的平台设计我的应用程序。在资源字典中,我可以使用以下

<ResourceDictionary 
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<OnPlatform x:Key="ButtonSize" x:TypeArguments="x:Double">
<On Platform="iOS" Value="14" />
<On Platform="Android" Value="16" />
</OnPlatform>
</ResourceDictionary>

什么是";平台字符串";适用于Windows和Mac?

<On Platform="???" Value="16" />

根据文档

  • 安卓
  • iOS
  • MacCatalyst
  • Tizen
  • WinUI

最新更新