This example demonstrates to show empty message when listview has no items by using the visibility property.
<Grid Padding="{OnPlatform iOS='0,40,0,0'}">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button x:Name="ItemSource" Grid.Row="0"
Text="Change ItemSource"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
Command="{Binding OnItemsSourceChanged}"/>
<Grid IsVisible="{Binding IsVisible}" Grid.Row="1">
<Label x:Name="label"
Text = "No Items :("
FontSize ="Default"
HorizontalOptions = "FillAndExpand"
HorizontalTextAlignment = "Center"
VerticalTextAlignment = "Center"
VerticalOptions = "FillAndExpand"/>
</Grid>
<syncfusion:SfListView x:Name="listView" Grid.Row="1" ItemsSource="{Binding ContactsInfo}"
IsVisible="{Binding Path=IsVisible, Converter={StaticResource visibilityConverter}}"
ItemSpacing="2" ItemSize="30">
<syncfusion:SfListView.ItemTemplate>
<DataTemplate>
<Label Text="{Binding ContactName}"/>
</DataTemplate>
</syncfusion:SfListView.ItemTemplate>
</syncfusion:SfListView>
</Grid>
See How to show empty message when listview has no items in Xamarin.Forms for more details.
- Visual Studio 2017 or Visual Studio for Mac.
- Xamarin add-ons for Visual Studio (available via the Visual Studio installer).
If you are facing path too long exception when building this example project, close Visual Studio and rename the repository to short and build the project.