I have an app that is programmatically populating a Grid with items in specified Row/Column positions.
I am using the grid.Children.Add(view, column, row)
method;
It works fine and the Grid behaves as expected.
What is interesting is that I am not adding to RowDefinitions or ColumnDefinitions.
When the Grid is drawn, all the items are presenting but the RowDefinition and ColumnDefinition collections have counts of zero.
I was wondering if this is a feature or a bug. I am happy working this way. It makes it very easy to grow and shrink the Grid. (When I remove all children on the far right column or bottom row, the grid resizes itself. and I do not need to remove row/col definitions)
All the Xamarin examples for code behind ...
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/layouts/grid#Rows_and_Columns
... show Row/Column definitions added before adding Views to the Children collection.