dotnet / dotnet/maui

requestLayout improperly called with a CollectionView

Open
#7,902 3 comments 0 reactions 0 assignees View on GitHub
area-layout s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 10h
Merged PRs (30d)
297

Description

Yes I'm getting something similar. It is a page with a CollectionView containing labels and imagebuttons and a button at bottom. I get the error message with the button. I replaced the button in the list with an image button, but these do not give the error unlike the previous button, and this is bound to a ViewModel

I only get the error on the first button press after that it's ok
Here's the error list
```
[View] requestLayout() improperly called by crc640ec207abc449b2ca.ContainerView{2b3b435 V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc6452ffdc5b34af3a0f.LayoutViewGroup{d82e23b V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc640ec207abc449b2ca.ContainerView{1b264d2 V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc6452ffdc5b34af3a0f.LayoutViewGroup{791c4a0 V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc640ec207abc449b2ca.ContainerView{5183da V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc6452ffdc5b34af3a0f.LayoutViewGroup{2904ee8 V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc640ec207abc449b2ca.ContainerView{b168de2 V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc6452ffdc5b34af3a0f.LayoutViewGroup{e7a3c30 V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc640ec207abc449b2ca.ContainerView{59ca2ea V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc6452ffdc5b34af3a0f.LayoutViewGroup{72fac78 V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc640ec207abc449b2ca.ContainerView{dcae2f2 V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame
[View] requestLayout() improperly called by crc6452ffdc5b34af3a0f.LayoutViewGroup{9bcbfc0 V.E...... ......ID 0,0-743,166} during second layout pass: posting in next frame

```

Here's the xaml (I can add the ViewModel if you wish.
```















```

_Originally posted by @gfmoore in https://github.com/dotnet/maui/discussions/6512#discussioncomment-2912498_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.