microsoft / microsoft-ui-xaml-specs

API spec repository for the Windows UI Library (WinUI)
https://github.com/Microsoft/microsoft-ui-xaml
Creative Commons Attribution 4.0 International
119 stars 40 forks source link

Grid: RowDefinition and ColumnDefinition Constructor changes #85

Open anawishnoff opened 4 years ago

anawishnoff commented 4 years ago

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?