We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfListView EmptyView don't show binding property in release mode

SfListView EmptyView work well in debug mode but not work in release mode.


it's debug mode display:


it's release mode display:

xaml code:




4 Replies

SY Suthi Yuvaraj Syncfusion Team January 5, 2023 04:05 PM UTC

Hi Leiurayer,


We have checked the reported query “SfListView EmptyView don't show binding property in release mode”, we are unable to reproduce the issue at our end. We have checked the EmptyView with EmptyViewTemplate in both debug and release mode , which is working fine at our end. EmptyView is object can be set to a string or view . we have attached the sample for your reference.


if possible, please modified the sample or share the below details to replicate the reported scenario on our end. It will be more helpful for us to provide a timely solution.

  1. Code snippet related to SfListview and datapopulation
  2. Code snippet related to StaticWebsiteEmpty , which bound to the Empty View,
  3. Platform related details and
  4. Visual studio 2022 version and Syncfusion.Maui.ListView version.


Regards,

Suthi Yuvaraj.



SY Suthi Yuvaraj Syncfusion Team January 5, 2023 04:06 PM UTC

Hi Leiurayer,

Please find the attachment in this update.

Regards,

Suthi Yuvaraj


Attachment: EmptyViewTemplate_e85ab969.zip


LE Leiurayer January 6, 2023 09:47 AM UTC

The template you provided still doesn't work in my project. But I found the solution, adding the source while binding does the trick.

I think it might be the reason of CommunityToolkit.Mvvm.


xaml:

<sflistview:SfListView.EmptyViewTemplate>
                <DataTemplate>
                    <VerticalStackLayout
                        HorizontalOptions="CenterAndExpand"
                        Spacing="16"
                        VerticalOptions="CenterAndExpand">
                        <Image
                            HeightRequest="48"
                            Source="empty_dashboard.png"
                            WidthRequest="48" />
                        <Label Text="{Binding EmptyView, Source={x:Reference listView}}" />
                    </VerticalStackLayout>
                </DataTemplate>
            </sflistview:SfListView.EmptyViewTemplate>


SY Suthi Yuvaraj Syncfusion Team January 9, 2023 02:23 PM UTC

Leiurayer,


We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help.



Loader.
Up arrow icon