You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
When RowDefinitions is set to a populated RowDefinitionCollection, that change doesn't cause the Grid to be updated.
Updating an existing RowDefinitions value triggers an update, but setting a completely new value doesn't.
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void Button_Clicked(object sender, EventArgs e)
{
var row1 = new RowDefinition();
row1.Height = 400;
var row2 = new RowDefinition();
row2.Height = 100;
var row3 = new RowDefinition();
row3.Height = 200;
var rows = new RowDefinitionCollection();
rows.Add(row1);
rows.Add(row2);
rows.Add(row3);
MyGrid.RowDefinitions = rows;
}
}
Run the app and hit the Update RowDefinitions button
Expected Behavior
The Grid should update, with the new row heights.
Actual Behavior
Nothing changes visually, at least not at first.
Note that if the code is changed to set an empty collection first and then update the collection, like below, it works. But it doesn't work when the property is set directly with the fully populated collection.
var rows = new RowDefinitionCollection();
MyGrid.RowDefinitions = rows;
rows.Add(row1);
rows.Add(row2);
rows.Add(row3);
This is a problem for Hot Reload, when updating RowDefinitions using the string syntax (RowDefinitions="400,100,200"). In that case Hot Reload invokes the type converter, getting a fully populated RowDefinitionCollection, then sets the RowDefinitions property & the grid doesn't update.
Basic Information
Version with issue: 5.0 pre5
Last known good version: none known
Platform Target Frameworks:
Android: VS 16.9
Android Support Library / AndroidX Version:
The text was updated successfully, but these errors were encountered:
Description
When RowDefinitions is set to a populated RowDefinitionCollection, that change doesn't cause the Grid to be updated.
Updating an existing RowDefinitions value triggers an update, but setting a completely new value doesn't.
Steps to Reproduce
with code behind like this:
Expected Behavior
The Grid should update, with the new row heights.
Actual Behavior
Nothing changes visually, at least not at first.
Note that if the code is changed to set an empty collection first and then update the collection, like below, it works. But it doesn't work when the property is set directly with the fully populated collection.
This is a problem for Hot Reload, when updating RowDefinitions using the string syntax (
RowDefinitions="400,100,200"
). In that case Hot Reload invokes the type converter, getting a fully populated RowDefinitionCollection, then sets the RowDefinitions property & the grid doesn't update.Basic Information
The text was updated successfully, but these errors were encountered: