Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

False Binding Error Messages on ListViews #12845

Closed
DRAirey1 opened this issue Nov 13, 2020 · 3 comments
Closed

False Binding Error Messages on ListViews #12845

DRAirey1 opened this issue Nov 13, 2020 · 3 comments
Labels
s/unverified New report that has yet to be verified t/bug 🐛
Projects

Comments

@DRAirey1
Copy link

DRAirey1 commented Nov 13, 2020

Description
When using ListView, if you set its ItemsSource, the binding engine will report an error that parent (owner of the ItemsSource) couldn't bind to the properties in the templated control. This is a false error because the parent doesn't need to/shouldn't bind to an item in a list. It does this for every item in the list, try unsuccessfully to bind to the parent, then successfully bind to the item in the list. So if you have, say, 100 items in your list with 5 bindings per item, you end up with 500 errors in the debug window.

These false errors make it impossible to find actual errors when debugging. In addition, This impacts performance because you're attempting 500 binding operations on the parent of the list for no good reason (as in the example above) before you find the right view model when you could have done it right the first time.

Steps to Reproduce
Build the application according to this tutorial: https://docs.microsoft.com/en-us/xamarin/get-started/tutorials/listview/?tabs=vswin
Expected Behavior
The app works. No error in the VS Output window.

Actual Behavior
The app works but we have the following in the debug window:

Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'ImageUrl' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Image.Source'
Binding: 'Name' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'
Binding: 'Location' property not found on 'App1.MainPage', target property: 'Xamarin.Forms.Label.Text'

Basic Information
Version with issue: 4.8.0.1687
IDE: Visual Studio 2019 Windows
Platform Target Frameworks: UWP, iOS, Android

@DRAirey1 DRAirey1 added s/unverified New report that has yet to be verified t/bug 🐛 labels Nov 13, 2020
@samhouts samhouts added this to New in Triage Nov 13, 2020
@MitchBomcanhao
Copy link

FYI I've logged a similar issue quite some time ago #10437

@rachelkang
Copy link
Contributor

Hi, @DRAirey1 - thanks for submitting this issue. As @MitchBomcanhao mentioned, this is a duplicate of #10437 so I'm closing this issue now.

Triage automation moved this from New to Closed Nov 13, 2020
@DRAirey1
Copy link
Author

DRAirey1 commented Nov 13, 2020

Why did you remove my problem report when it has a simple repo? There is no repo in issue #10437. You should merge these two.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
s/unverified New report that has yet to be verified t/bug 🐛
Projects
Triage
  
Closed
Development

No branches or pull requests

3 participants