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

TableView Containing Grids as Rows - How to set height?

$
0
0

I have a TableView and each TableSection contains grids that are in ViewCells

        var content = new TableView
        {
            Intent = TableIntent.Data,
            Root = new TableRoot("Performance"),
            BackgroundColor = Color.Green
        };

I create the Table Sections:

        TableSection section = new TableSection()
        {
            Title = title 
        };

Each Section is a bunch of Grids

            Grid grid = new Grid
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                HeightRequest = 100,
                BackgroundColor = Color.Red,
                ColumnDefinitions =
                {
                    new ColumnDefinition {Width = new GridLength(.3, GridUnitType.Star)},
                    new ColumnDefinition {Width = new GridLength(.3, GridUnitType.Star)},
                    new ColumnDefinition {Width = new GridLength(.3, GridUnitType.Star)},

                } 
            };

   .......

            section.Add(new ViewCell()
            {
                View = grid,
                Height = 100
            });

Nothing I do changes the height of the row that holds the Grid. It's squaished.

See the attached screenshot


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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