Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

How to make TableView fit to content, with no extra rows

$
0
0

When rendering a TableView, on either Android or iOS, it takes up a certain amount of space, regardless of the size of the content. My sample code is the following XAML:

<TableView>
    <TableSection>
        <TextCell Text="Cell 1" />
        <TextCell Text="Cell 2" />
        <TextCell Text="Cell 3" />
    </TableSection>
</TableView>

On iOS, it takes up a screen height and is filled with blank empty rows after the 3 real ones. And on android it's something like half a screen.

How do I make it fit to the size of the content and only show the 3 rows it has?


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>