xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

Layout does not fill space when device is rotated #15227

Open JPfahl opened 2 years ago

JPfahl commented 2 years ago

Description

Layout does not fill space when device is rotated

Steps to Reproduce

  1. Rotate device to landscape
  2. reproducable with: new ListView() { ItemsSource = ViewModel.CheckList, ItemTemplate = new DataTemplate(() => { ViewCell viewCell = new XLabs.Forms.Controls.ExtendedViewCell() { View = new StackLayout() { HorizontalOptions = LayoutOptions.FillAndExpand, BackgroundColor = Color.Blue }, };

                        return viewCell;
                    })
                }

Expected Behavior

ViewCell content would fill avalable space when device is rotated.

Actual Behavior

Fequently but not always veiwcell content is shifted left or right or both

Basic Information

Environment

Screenshots

Working Screenshot 2022-03-14 133002 Not Working Screenshot 2022-03-14 133054 Working Screenshot 2022-03-14 143416 Not Working Screenshot 2022-03-14 143321 Working using example code Screenshot 2022-03-14 143150 Not Working using example code Screenshot 2022-03-14 142951 Screenshot 2022-03-14 142926

Reproduction Link

Workaround

None found

jfversluis commented 2 years ago

I see you're using XLabs.Forms.Controls.ExtendedViewCell() which I don't think has been maintained for a long time. Does the bug also occur if you don't use that?

JPfahl commented 2 years ago

It still happens if you use new ViewCell()