How can I change the layout orientation (horizontal vs. vertical) of a ListView in .NET MAUI?

Platform: .NET MAUI| Category: Controls

.NET MAUI’s ListView does not have a built-in orientation property to switch between horizontal and vertical layouts. In .NET MAUI, the ListView typically displays items vertically. If you want to create a horizontal layout, you need to use a different layout container or a custom control.

XAML

<CollectionView ItemsSource="{Binding MyItems}">
     <CollectionView.ItemsLayout>
         <LinearItemsLayout Orientation="Horizontal" />
     </CollectionView.ItemsLayout>
     <!-- ItemTemplate and other customizations here -->
 </CollectionView>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.