0 Replies - 917 Views - Last Post: 08 May 2021 - 05:02 PM

#1 ikhlas_06   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 21-June 18

xamarin forms - how to create a Fit UI

Posted 08 May 2021 - 05:02 PM

I am setting manually size of frames by:
HeightRequest=150
. This has some issues. Not every phone is same size.

how can I set height of Fame so that it always fit on any phone. so on long phones (Samsung Note) frame should expand a bit. and smaller phone (IPhone5) frame it should shink to fit the screen



<StackLayout Padding="10">

            <Entry Placeholder="Enter Name"></Entry>
            <Label></Label>

            <Frame BackgroundColor="Transparent" 
                   CornerRadius="30" BorderColor="Blue"
                   HorizontalOptions="FillAndExpand" HeightRequest="150">

            </Frame>
            <Label></Label>

            <Frame BackgroundColor="Transparent" 
                   CornerRadius="30" BorderColor="Blue"
                   HorizontalOptions="FillAndExpand" 
                   VerticalOptions="FillAndExpand" HeightRequest="150">
                
            </Frame>
                <Label></Label>
            
            <Button Text="Save" CornerRadius="50" HorizontalOptions="Center" />
            <Label></Label>


Is This A Good Question/Topic? 0
  • +

Page 1 of 1