title | page_title | description | position | slug |
---|---|---|---|---|
Empty Template |
.NET MAUI CollectionView Documentation - Empty Template |
Learn more about the Empty Template property of the .NET MAUI CollectionView control. |
20 |
collectionview-empty-template |
The CollectionView allows you to specify a template that the control will use when the ItemsSource
is null or the collection is empty. In this way, you notify the user that no data is available to display.
-
EmptyContentTemplate
(DataTemplate
)—Defines the content of the view which is shown when in the view has no items. -
EmptyContentDisplayMode
—Defines the modes for displaying empty content. The property has two modes: -ItemsSourceNull
—Displays the empty content view only when theItemsSource
is null. -ItemsSourceNullOrEmpty
—Displays the empty content view whenItemsSource
is null or when the source is empty (has zero items).
1. Define the RadCollectionView
in XAML:
2. Add the telerik
namespace:
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
This is the result on Android:
For a runnable example demonstrating the CollectionView
EmptyTemplate
, see the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and go to CollectionView > EmptyTemplate category.
- [Grouping]({%slug collectionview-grouping%})
- [Filtering]({%slug collectionview-filtering%})
- [Selection]({%slug collectionview-selection%})
- [Commands]({%slug collectionview-commands%})