Bongo
Bongo

Reputation: 3153

What are the OnPlatform Strings in Xaml(.Net Maui)

I have a Maui app and want to style my app according to the platform I am on. In a resource dictionary, I can use the following

<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>

What are the "Platform Strings" for Windows and Mac?

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

Upvotes: 7

Views: 6778

Answers (1)

Jason
Jason

Reputation: 89169

according to the docs

  • Android
  • iOS
  • MacCatalyst
  • Tizen
  • WinUI

Upvotes: 12

Related Questions