Binding errors in VS debug trace, even though binding does work

Hi,

we are using multiple SFListViews in our Xamarin.Forms app and see for all bound properties (ItemsSource and commands) log messages like

Binding: 'FooCommand' property not found on 'XamarinApp.ViewModels.FooVM', target property: 'Syncfusion.ListView.XForms.SfListView.TapCommand'
Binding: 'FooList' property not found on 'XamarinApp.ViewModels.FooVM', target property: 'Syncfusion.ListView.XForms.SfListView.ItemsSource'

in the trace window of Visual Studio (Windows).

But: Everything works as expected. That means the items are correctly represented in the SfListView and the commands do work.

Nevertheless, we are somewhat uncomfortable with the binding errors.

We are using .Net Standard 2.0, Xamarin Forms 3.1.0.697729 and SfListView 16.2.0.46. We are experiencing this with the Android build.

Could anybody confirm this behavior?

Regards, Ulrich

11 Replies

JN Jayaleshwari N Syncfusion Team August 7, 2018 10:32 AM UTC

Hi Ulrich,  
  
Thanks for contacting Syncfusion support.  
  
We have checked the reported query form our end. We have prepared the sample based on the information given from your update. Unfortunately, we are not facing the binding errors when bind the ItemsSource and TapCommand.   
  
For your reference we have attached the sample and you can download it from the below link.  
  
  
Can you please check whether the reported issue occurs in our sample also? If possible, can you please modify our sample to replicate the reported issue in our sample and also please share more details about whether you have used any prism or some other techniques which would highly help us to analyze the query better.      
  
Regards,  
Jayaleshwari N. 



UN Unknown Syncfusion Team August 13, 2018 09:07 AM UTC

Hi Jayaleshwari N.,

thank you very much for checking and providing a sample project.

The relevant difference seems to be, that the setters for our properties are declared private.

Hence, if you change e.g. TapCommand to

     public ICommand TapCommand { get; private set; }

in BookInfoRepository.cs, you should also get a

     Binding: 'TapCommand' property not found on 'GettingStarted.BookInfoRepository', target property: 'Syncfusion.ListView.XForms.SfListView.TapCommand'

warning in the debug trace of Visual Studio.

As the binding mode is not explicitely set in the Xaml, one would expect the default to be OneWay and hence no need for a (public) setter, wouldn't one?

In my opinion, it would even be bad style to make the setter public.

The same applies for the ItemsSource lists, at least as long as they are logically read only and the binding mode is not explicitly set to TwoWay.

Or do I miss anything obvious?

Regards, Ulrich


JN Jayaleshwari N Syncfusion Team August 14, 2018 12:22 PM UTC

Hi Ulrich 
  
We have checked the sample by declare the setter of the property as private but it not sowing the binding error.. Then we found a workaround to show these errors from the below link.  
  
  
We have write the below code in the MainPage.cs and AppDelegate before calling LoadApplication which shows the binding error in output window.  
  
 
Log.Listeners.Add(new DelegateLogListener((c, m) => Debug.WriteLine(m, c)));                                                                                                                    
  
  
The same error occurs for the Xamarin ListView. We suspect that issue is related to the framework / IDE side. We have found that query asked the same type of issue in the Xamarin.Forms Forums. Please find the link below for more details.  
  
  
Meanwhile, we will check and try to found the root cause for the reported issue and will update you further details on August 17, 2018.  
  
Regards,  
Jayaleshwari N 



UN Unknown Syncfusion Team August 16, 2018 12:08 PM UTC

Hi Jayaleshwari N,

thank you very much for your efforts.

What I still do not understand: Why is the (default) BindingMode for e.g. the BindableProperty TapCommandProperty set to TwoWay in SfListView?

If I explitly set the mode with Mode=OneWay in the binding, the binding errors, even with a private setter for FooCommand in the view model, vanish from the debug trace.

I do currently not see the point for altering the command from the control in the view model, which would need a TwoWay (or OneWayToSource) binding...?

Regards, Ulrich


JN Jayaleshwari N Syncfusion Team August 17, 2018 12:40 PM UTC

Hi Ulrich,  
  
Sorry for the inconvenience caused.  
  
We have checked the reported query from our end. We have logged defect report for the reported query. The fix will be included in our upcoming 2018 Volume 2 SP2 release which is scheduled to be rolled out by the end of August month. We will appreciate your patience until then.     
  
Regards,  
Jayaleshwari N  



UN Unknown Syncfusion Team August 17, 2018 12:45 PM UTC

Hi Jayaleshwari N,

thank you very much!

Regards, Ulrich


RS Rawoof Sharief Muthuja Sherif Syncfusion Team August 20, 2018 06:28 AM UTC

Hi Ulrich, 
 
Thanks for the update. 
 
Regards, 
Rawoof M. 



JN Jayaleshwari N Syncfusion Team September 16, 2018 02:43 PM UTC

Hi Ulrich, 
 
We are glad to announce that our Essential Studio 2018 Volume 3 beta Release v16.3.0.17 is rolled out and is available for download under the following link.  
  
   
The reported issue “The binding errors occur for the bindable properties like tap, hold, and load more command, and so on” has been resolved and included in this release .We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  
  
Regards,  
Jayaleshwari N. 



JN Jayaleshwari N Syncfusion Team September 24, 2018 05:44 AM UTC

Hi Ulrich,    
We are glad to announce that our Essential Studio 2018 Volume 3 Main Release v16.3.0.21 is rolled out and is available for download under the following link.     
The reported issue “The binding errors occur for the bindable properties like tap, hold, and load more command, and so on.” has been resolved and included in this release .We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Jayaleshwari N. 



UN Unknown Syncfusion Team September 24, 2018 07:20 AM UTC

Hi Jayaleshwari N,

thank you very much for the fix and keeping us up to date in this thread.

I made a short test this morning and while the issue is gone for the Tap- and the HoldCommand, we experience the same behavior as before for the ItemsSource property.

IMHO there is no point in changing the list instance (!) from the control in the view model, hence I do not understand the TwoWay binding mode for ItemsSource either. IMHO you do not need to have the TwoWay binding for altering elements in the list, do you?

For now we'll just keep the Mode=OneWay attribute set in our XAML to avoid the binding errors in the log.

Regards, Ulrich


JN Jayaleshwari N Syncfusion Team September 25, 2018 12:10 PM UTC

Hi Ulrich,  
   
Sorry for the inconvenience caused.  
  
We have checked the reported query from our end. We have included the fix for the issue with “TapCommand, HoldCommand and LoadMoreCommand”. We have already logged defect report for the reported query regarding properties like ItemsSource and etc.,. The fix will be included in our upcoming 2018 Volume 3 SP1 release which is scheduled to be rolled out by the end of October month. We will appreciate your patience until then.     
  
Regards,  
Jayaleshwari N 


Loader.
Up arrow icon