---
title: "Discussion on \"Rotating a list in Xamarin.Forms using CollectionView\" | Hashnode"
description: "Discussion on \"Rotating a list in Xamarin.Forms using CollectionView\". Changing the layout and item template of CollectionView when a device is rotated to improve our Xamarin.Forms UI in Portrait and Landscape."
url: "https://hashnode.com/posts/rotating-a-list-in-xamarinforms-using-collectionview/6175e7d50f452c1cd94fbde6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Rotating a list in Xamarin.Forms using CollectionView](https://blog.taranissoftware.com/rotating-a-list-in-xamarinforms-using-collectionview?utm_source=hashnode&utm_medium=feed)

Changing the layout and item template of CollectionView when a device is rotated to improve our Xamarin.Forms UI in Portrait and Landscape.

Oct 24, 2021 · 6 min read · blog.taranissoftware.com  
Updated Dec 31, 2021  
Read the article

-   [#xamarin](https://hashnode.com/tag/xamarin)
-   [#dotnet](https://hashnode.com/tag/dotnet)

## Written by

[Dave Murray](https://hashnode.com/@Irongut)

@Irongut · Scotland, UK

  
[View profile](https://hashnode.com/@Irongut)

.NET developer with a passion for mobile and DevOps.

.NET developer with a passion for mobile and DevOps. I build cross platform apps using Xamarin, backend systems using Azure and GitHub Actions using Docker.

## Responses 2

Markdown supported · ⌘↵ to post

[Robin Sedlaczek](https://hashnode.com/@NewGuid)

[Nov 24, 2021](https://hashnode.com/posts/rotating-a-list-in-xamarinforms-using-collectionview/6175e7d50f452c1cd94fbde6/comment/619db86b1a07d7765ae865e2)

Why not using trigger to switch the layouts?

[Dave Murray](https://hashnode.com/@Irongut)

[Nov 24, 2021](https://hashnode.com/posts/rotating-a-list-in-xamarinforms-using-collectionview/6175e7d50f452c1cd94fbde6/comment/619db86b1a07d7765ae865e2#reply-619e52b411146d7e145e993b)

Hi Robin, I wanted the simplest way to change the layout & orientation and for me that was data binding so I didn't consider triggers. Triggers might give better performance, although I haven't had any problems using bindings, but think the best solution likely involves Visual State Manager.

Perhaps I'll revisit the article in future and demonstrate using triggers and VSM instead.

[Sjors Miltenburg](https://hashnode.com/@SjorsMiltenburg)

[Nov 1, 2021](https://hashnode.com/posts/rotating-a-list-in-xamarinforms-using-collectionview/6175e7d50f452c1cd94fbde6/comment/61800041f597ba4a8279614a)

Did you test this on iOS? I do something similar, where I change the width of the items in the list depending on the view width so there are a certain nr of items horizontally that nicely fill the screen. But when rescaling the items size-wise iOS doesn't get it. I need to scroll up and down (to refresh the items) for it to show the new sizes. Any ideas?

[Nov 2, 2021](https://hashnode.com/posts/rotating-a-list-in-xamarinforms-using-collectionview/6175e7d50f452c1cd94fbde6/comment/61800041f597ba4a8279614a#reply-618138a1a4505a32bcf1cf69)

Hi I find it easier to prototype with Android and I've not tested this technique on iOS yet. What ItemSizingStrategy are you using?
