Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

ListView not displaying in Xamarin.Forms/macOS project

zintjrzintjr Member ✭✭
edited August 2018 in Xamarin.Forms

I have a Xamarin.Forms macOS project with a ListView that has IsGroupingEnabled=true and can't get it to display when I run the app.

The ListView displays with data in the Preview window and on the iOS simulator but when running the mac project it just shows a blank white screen. ListViews do work on macOS right? Am I missing something else? Thanks!

<?xml version="1.0" encoding="utf-8"?>

        GroupDisplayBinding="{Binding Key}">

                    <ContentView Padding="5,0,0,0">
                        <Label Text="{Binding Key}" VerticalOptions="Center"/>

                <ViewCell Height="40">

                    <StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand" BackgroundColor="White">                  

                        <StackLayout Orientation="Vertical" WidthRequest="160" Margin="10,0,0,0" Spacing="0" HorizontalOptions="StartAndExpand">
                            <Label TextColor="Black" LineBreakMode="TailTruncation" HorizontalOptions="StartAndExpand" Text="{Binding FullName}" Margin="15,3,0,0" FontSize="Small" />
                            <Label TextColor="Blue" Text="{Binding PhoneExtension}" Margin="15,0,0,2" FontSize="Small" />

                        <StackLayout Orientation="Horizontal" HeightRequest="20" WidthRequest="10" VerticalOptions="Start" HorizontalOptions="CenterAndExpand" Margin="10,3,0,0" >
                            <Image HorizontalOptions="Center" HeightRequest="10" WidthRequest="10" IsVisible="{Binding IsAvailable}" Source="green_checkmark" Margin="0,0,0,2" />
                            <Frame IsVisible="{Binding IsNotAvailable}" BackgroundColor="Transparent" HeightRequest="10" WidthRequest="10"/>

                        <Label Text="{Binding PersonStatus}" HeightRequest="20" WidthRequest="100" HorizontalTextAlignment="Start" TextColor="Black" FontSize="Small" Margin="0,3,3,0" />                       



  • @zintjr have you tried removing IsGroupingEnabled=true, if data showing in list? Just asking to make sure its not data related issue in real device.

Sign In or Register to comment.