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

Do ColumnDefinitions have to be added to a Grid pre ui tree?

$
0
0

I have a weird issue where I add a bunch of items in code behind to a grid, they show fine when I set their row/col via Grid.SetRow/SetColumn. Problem is that the ColumnDefinition count is always 0. When I decide to add ColumnDefinitions right before adding the item to the grid, the items never show up. I have also tried prefilling the a ColumnDefinitionCollection and then setting the Grid.ColumnDefinitions property with it thinking maybe it doesnt know when a new one is added. Nope, still items dont show. If I add in Xaml everything is fine, but these items are of a dynamic nature and I am not sure what the count is until runtime.

So should this be happening?

Thanks,
Brad


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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