Nice subtle improvement. While probably out of scope for this PR, I'm curious if you also would consider simplifying adding a set of definitions. If I had to add 4 rows, I could merely say something like
myGrid.RowDefinitions = new RowDefinitionCollection(new GridLength(5).new GridLength(5, GridUnitType.Star), GridLength.Auto);
I realize that would also require RowDefinitions to be settable.
An alternative would be to add an AddRange method to it.
Thanks @dotMorten! I like this idea. I think that changing RowDefinitions to be settable might be too big of a change for the scope of this change (might open up a whole other can of worms), but adding an AddRange method to RowDefinitions seems like a simple and very useful change. It would be a seemingly simple API update to add that method... @MikeHillberg do you think adding an AddRange() method to RowDefinitions and ColumnDefinitions would pose any issues?
Thanks @dotMorten! I like this idea. I think that changing RowDefinitions to be settable might be too big of a change for the scope of this change (might open up a whole other can of worms), but adding an AddRange method to RowDefinitions seems like a simple and very useful change. It would be a seemingly simple API update to add that method... @MikeHillberg do you think adding an AddRange() method to RowDefinitions and ColumnDefinitions would pose any issues?