how to create page with curved bottom?????

unknown123unknown123 Member ✭✭✭

How to create a page like this..??????

Im created a sample but it doestnt look like thiss..?? :s:s

In above i used 1main stacklayout inside that layout i created two stack layout and inserted frame inside that
and used a corner radius for frame but i still didnt get an exact as above one ..???

Is any other solution for that???

Answers

  • ManojkumarMaliManojkumarMali USMember ✭✭✭

    Hi,
    If it for design purpose only then the best way is to use BackgourdImage.

  • unknown123unknown123 Member ✭✭✭

    its not a design purpose..

    we are adding element dynamically so its not possible to add element in image..

  • ColeXColeX Member, Xamarin Team Xamurai

    You could put the image inside Grid as the background.

    First , you need a image like this

    Then , make your xaml like this

    <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>
    
            <StackLayout BackgroundColor="Yellow">
                <Label Text="111" HorizontalTextAlignment="Center"/>
                <Button Text="Click me"/>
    
                //add element here 
            </StackLayout>
    
            <Image Source="image" Grid.Row="1" Aspect="Fill"/>
    
        </Grid>
    

    Result

  • unknown123unknown123 Member ✭✭✭

    Image will expand by adding element dynamicallyy

  • ColeXColeX Member, Xamarin Team Xamurai

    @AjithKumar123 said:
    Image will expand by adding element dynamicallyy

    Where do you want to place those element , there is no relationship between image and new adding elements.

  • ManojkumarMaliManojkumarMali USMember ✭✭✭

    @AjithKumar123 said:
    its not a design purpose..

    we are adding element dynamically so its not possible to add element in image..

    You can set BackgroundImage to page.

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 x:Class="Test.FirstLoadScreen"
                 BackgroundImage="your_iamge.png">
    </ContentPage>
    

    https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.page.backgroundimage?view=xamarin-forms

Sign In or Register to comment.