I am at a loss here, so I may ramble a bit.
I have some code that was tested and working under Xamarin Forms 3/VS2017. We updated to Xamarin Forms 4.3/VS2019.
On opening a popup (Rg.Plugins.Popup, using a ContentView), I now see messages in my debug window like:
[0:] Binding: 'Tag_Number' property not found on 'OurCustomDict', target property: 'MyControl.FieldValue'
The messages appear upon setting the BindingContext for the ContentView, which we are doing in the constructor.
In XAML, the binding looks like:
FieldValue="{Binding CurrentPick[Tag_Number]}"
where CurrentPick is the 'OurCustomDict' - which is really a Dictionary<string, object>. 'MyControl.FieldValue' is the property name backing a bindable property on a custom control.
If I set a break after the binding context is set (after seeing the debug messages), all ways that I think of to access this information show valid data, e.g.
?((AppData)this.BindingContext).CurrentPick["Tag_Number"]
966093
When I first noticed this problem, I also realized that the code would actually work in Release mode - just not in Debug mode. After investigating, I tried changing properties on the Android project, such as the linking setting, and fast deployment, etc. Now, I can't get back to the state where Release works.
First, I'm wondering why in the world if Xamarin thinks that my bindings are broken, why doesn't it throw an exception? But anyway...
Beyond that, the only thing I can think of is that for some reason, the binding process doesn't seem to understand what the Type of the object is at the time it tries to bind it.
I'm looking for some input on this - whatever the problem is, it's not as simple as the property not being on the object in question. Can anyone explain why it might work in Release, but fail in Debug?
Any help is appreciated.
Thanks.