Skip to content

Commit

Permalink
- add test
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWeen committed Jun 18, 2024
1 parent b1fad42 commit 70772e0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Controls/tests/Core.UnitTests/ListViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1649,5 +1649,25 @@ public void DoesNotRetainInRecycleMode()

Assert.False(ReferenceEquals(item1, item2));
}

[Fact]
public void ForceUpdateSizeCalledOnViewCellDoesntCrash()
{
var list = new ListView(){
HasUnevenRows = true
};

list.ItemTemplate = new DataTemplate(() =>
{
return new ViewCell { View = new Label() };
}
);

list.ItemsSource = new[] { "Hi" };

var element = (ViewCell)list.TemplatedItems[0];

element.ForceUpdateSize();
}
}
}

0 comments on commit 70772e0

Please sign in to comment.