Forum Xamarin.Forms

How can I change ViewCell height?

qweerqweer Member ✭✭

I have ViewCell in TableView, I need to put two buttons there:

                <ViewCell Height="100">
                    <StackLayout Margin="10,0">
                        <Button Text="Button 1" />
                        <Button Text="Button 2" />
                    </StackLayout>
                </ViewCell>

Height don't work. How can I change ViewCell's height?

Best Answer

Answers

  • CharwakaCharwaka INMember ✭✭✭✭✭

    Have you applied to stacklyout ?

  • qweerqweer Member ✭✭

    @Charwaka said:
    Have you applied to stacklyout ?

    Yes, I tryed to apply height to StackLayout

  • JohnHJohnH GBMember ✭✭✭✭✭

    @qweer said:
    I have ViewCell in TableView, I need to put two buttons there:

                    <ViewCell Height="100">
                        <StackLayout Margin="10,0">
                            <Button Text="Button 1" />
                            <Button Text="Button 2" />
                        </StackLayout>
                    </ViewCell>
    

    Height don't work. How can I change ViewCell's height?

    You should take a look at google, its quite useful:
    https://stackoverflow.com/questions/30696403/how-can-i-change-height-in-viewcell/31135950

  • TheEESTTheEEST Member
    edited February 21

    @VenkataSwamy said:
    Hi @qweer ,

    We can set Height for ViewCell Dynamically or fixed like below

    DynamicHeight

    <ListView HasUnevenRows = "true">
    
    </ListView>
    

    Fixed height

    <ListView RowHeight = "100">
    
    </ListView>
    

    HasUnevenRows !

Sign In or Register to comment.