How to define xaml element properties platform spesifically

Viewed 30

I have this Xaml page. How can I define width of the button spesific on Windows desktop?

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="NotesMaui.Views.Tankkaukset"
         Title="Tankkaukset">
<VerticalStackLayout>
    
        <Frame BackgroundColor="red" Padding="40" Margin="0, 5, 0, 0">
            <Label Text="Fuel App" HorizontalTextAlignment="Center" TextColor="White" FontSize="36"/>
        </Frame>
        <Frame BackgroundColor="GhostWhite" Padding="120">

            <Button x:Name="Btn_tankkaamaan" Clicked="Btn_tankkaamaan_Clicked" BackgroundColor="Lime" BorderWidth="3"
            BorderColor="red" FontSize="Medium" FontAttributes="Bold" Padding="20" CornerRadius="50" Margin="4, 30, 4, 20"
            Text="Tankkaamaan!"></Button>
        </Frame>

        <Frame BackgroundColor="red" Padding="50" Margin="0, 5, 0, 5">
            <Label Text="code hamsters" HorizontalTextAlignment="Center" TextColor="White" FontSize="18"/>
        </Frame>
    
</VerticalStackLayout>

In Win its not so optimal as in Android now

NOW ITS GOOD :) Thanks Jason!

Enhanced after Jason help

0 Answers
Related