How to add a rounded corner for .NET MAUI ListView items?
The .NET MAUI ListView allows customizing the item appearance, such as rounded corners, using the Frame layout in the ItemTemplate property.
XAML
Define the CornerRadius for frame to apply rounded corners for items.
<listView:SfListView x:Name="listView" ItemSize="80" BackgroundColor="#dfe0df" ItemsSource="{Binding ContactsInfo}" > <listView:SfListView.ItemTemplate> <DataTemplate> <Frame x:Name="frame" CornerRadius="10" Margin="10" Padding="0" HasShadow="False"> <Grid Padding="10,0,0,0" > <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid Grid.Column="0" RowSpacing="1" VerticalOptions="Start"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Label LineBreakMode="NoWrap" Text="{Binding ContactName}" FontSize="15" FontAttributes="Bold" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/> <Label Grid.Row="1" LineBreakMode="NoWrap" Text="{Binding ContactNumber}" HorizontalTextAlignment="Start" VerticalTextAlignment="Start"/> </Grid> <Label LineBreakMode="NoWrap" Text="{Binding ContactType}" FontSize="12" Grid.Column="1" VerticalTextAlignment="Center" HorizontalTextAlignment="End" Padding="10"/> </Grid> </Frame> </DataTemplate> </listView:SfListView.ItemTemplate> </listView:SfListView>
Take a moment to peruse the documentation to learn more about appearance customization in SfListView with code examples.
Conclusion
I hope you enjoyed learning how to add a rounded corner for .NET MAUI ListView items.
You can refer to our .NET MAUI ListView feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our .NET MAUI ListView example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!