Grid: Not getting invalidated when changing the Height/Width of Row/ColumnDefinitions declared with the short syntax #25983
Labels
area-layout
StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
partner
Issue or Request from a partner team
platform/android 🤖
platform/iOS 🍎
platform/macOS 🍏
macOS / Mac Catalyst
platform/windows 🪟
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
When declaring the RowDefinitions of a grid using the short syntax and then changing the Height property of a row, the grid doesn't get invalidated and the change takes effect after some other action invalidates the grid - for example if the window is resized (same for ColumnDefinitions).
Looking at: https://github.com/dotnet/maui/blob/main/src/Controls/src/Core/RowDefinitionCollectionTypeConverter.cs#L31 and https://github.com/dotnet/maui/blob/main/src/Controls/src/Core/DefinitionCollection.cs#L15 the SizeChanged event isn't triggered in this case, whereas adding the rows one by one triggers the SizeChanged event - https://github.com/dotnet/maui/blob/main/src/Controls/src/Core/DefinitionCollection.cs#L21.
I believe we should have the same behavior when using the short syntax for Row/ColumnDefinitions.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/telerik/ms-samples/tree/main/Maui/GridRowsShortSyntaxIssue
Version with bug
9.0.0 GA
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
No response
Did you find any workaround?
Call InvalidateMeasure after changing the value of Height/Width of Row/ColumnDefinitions.
Note: This may not fully cover everything that is missing out.
Relevant log output
The text was updated successfully, but these errors were encountered: