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

How to remove top margin/padding on TableView?

$
0
0

I have a stack layout with 3 items stacked vertically. The middle item is a TableView. This is the TableView:

        return new TableView 
        {
            Intent = TableIntent.Menu,
            Root = new TableRoot ("Profile") 
            {
                new TableSection (App.FacebookProvider.GetCurrentUserName()) 
                {
                    inboxCell,
                    new ExtendedTextCell 
                    {
                        Text = "Favorites",
                        ShowDisclousure = true
                    },
                    new ExtendedTextCell 
                    {
                        Text = "Posts",
                        ShowDisclousure = true
                    },
                    new ExtendedTextCell 
                    {
                        Text = "Album Invites",
                        ShowDisclousure = true
                    },
                },
            },
            BackgroundColor = Color.Transparent
        };

There is a margin at the top of the TableView by default that I want to remove. If you see the attached screenshots you can see the desired layout and the current layout with the extra margin. The TableView is scrollable so I just scrolled it to get the desired layout.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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