Xamarin.forms: CollectionView ItemsLayout Does Not Update in UWP

Created on 28 Apr 2020  路  1Comment  路  Source: xamarin/Xamarin.Forms

I have this code in place to change the number of columns in a CollectionView:

  protected override void OnSizeAllocated(double width, double height)
    {
        base.OnSizeAllocated(width, height);
        var columns = (int)Math.Round((width / 200) / 2, MidpointRounding.AwayFromZero) * 2;
        if (columns < 3) columns = 3;
        CollectionView.ItemsLayout = new GridItemsLayout(columns, ItemsLayoutOrientation.Vertical);
    }

It works fine on Android and iOS and changes the number of columns when the screen is loaded or the orientation changes. In UWP it does nothing.

collectionview 4 in-progress UWP bug

Most helpful comment

i have been waiting for my PR to be merged 1.5 month for this issue. There is already existing issue for Ios and android was fixed in July 2019 and nobody touched for uwp. I fixed in april and requested several times for review and merge. It is really annoying how xamarin teams is working. You can see they review only 1-2 PRs per day.

10316

>All comments

i have been waiting for my PR to be merged 1.5 month for this issue. There is already existing issue for Ios and android was fixed in July 2019 and nobody touched for uwp. I fixed in april and requested several times for review and merge. It is really annoying how xamarin teams is working. You can see they review only 1-2 PRs per day.

10316

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Papirosnik picture Papirosnik  路  3Comments

joseluisct picture joseluisct  路  3Comments

EmilAlipiev picture EmilAlipiev  路  3Comments

AppGrate picture AppGrate  路  3Comments

Stensan picture Stensan  路  3Comments