Padding problem with multiple OS

bilginbilgin Member
edited December 2018 in Xamarin.Forms

I am coding on MacOS with Visual Studio. My Xamarin Code doesn't work. My Xaml code is below.

    > <?xml version="1.0" encoding="utf-8"?>
    > <ContentPage > //I clipped this sentence to share this message
    >     <ContentPage.Padding>
    >     <OnPlatform x:TypeArguments="Thickness">
    >             <OnPlatform.Platforms>
    >                 <On Platform="iOS" Value="0, 20, 0, 0" />
    >                 <On Platform="Android" Value="0, 0, 0, 0" />
    >             </OnPlatform.Platforms>
    >         </OnPlatform>
    >      </ContentPage.Padding>
    >     <StackLayout>
    >         <Label Text="Merhaba Xamarin!" />
    >     </StackLayout>
    >         
    > </ContentPage>

This is my Xaml code and it doesn't work. When I use padding only in StackLayout, it works.But When I write this code, it does not work.
Can you help me to solve this problem?

Best Answer

Answers

Sign In or Register to comment.