how to add multiple controls on a same line using xamarin.forms ?

GupthaGuptha USMember ✭✭

Hi,
I'm learning the xamarin.forms and I would like to add an image on top-right corner and below that I want to add 3 buttons horizontally. and below the buttons I want to add a grid. Using XAML not C#.
here I'm able to add a grid. but I'm not understanding how to add those controls. When I'm adding them they are displaying one below the other.
can anyone help me out with this, please.
Thanks in advance.

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited December 2016

    @SKGuptha

    StackLayout Orientation="Horizontal"

    I would strongly urge you to work through the introductory stuff available from Xamarin to learn the basics. Just banging on the keyboard hoping to reverse-engineer some understanding of XAML never works well for anyone.

  • MikeRowley403MikeRowley403 CAMember ✭✭✭

    @SKGuptha I highly suggest you start reading Xamarin guides, this is as basic a question as it gets and a huge part of cross platform development is research and reading.

    Start here and keep reading at least through the end of User Interface section
    https://developer.xamarin.com/guides/xamarin-forms/getting-started/

  • GupthaGuptha USMember ✭✭

    thanks @ClintStLaurent @MikeRowley403
    definitely I'll come with the proper question. Thank you.

  • Isha_DawarIsha_Dawar INMember ✭✭
    edited February 2017

    @Guptha

    Definitely u could implement it with Grid Layout in xaml which would have two rows and a three columns as u said...
    *you would like to add an image on top-right corner and below that I want to add 3 buttons horizontally

    in xaml u could write as:-


    <Grid.RowDefinitions>


    </Grid.RowDefinitions>___
    <Grid.ColumnDefinitions>



    </Grid.ColumnDefinitions>

    Now the Image u want at top right corner would have the properties as HorizontalOption as right and Grid.ColSpan as 3 in the first Row.
    and the Below second row could have the buttons in their respective Columns.

    Hope it would help u.. :)

Sign In or Register to comment.