Open manojSF3414 opened 2 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
@simonrozsival @StephaneDelcroix @mgoertz-msft ?
That comes from the runtime and not IntelliSense, so @StephaneDelcroix would probably know best. @spadapet may also have an idea.
I tried this out, here are my notes:
int PageNumber = 0;
should be changed to a public property:
public int PageNumber { get; }
Entry.Text
property uses two-way binding by default, so the public property also needs a setter:
public int PageNumber { get; set; }
pageEntry.SetBinding(Entry.TextProperty, "PageNumber", BindingMode.OneWay);
So I don't think there's a bug in the binding code, the error message just doesn't clearly spell out all of the restrictions: a public property with both a getter and setter is required for a two-way binding. A field will not work.
Description
While debugging the applications, I found a warning while setting the binding for the TextProperty of the Entry control. The warning indicates that the class in which we have the property doesn't contain the property we used to bind. We are using a custom Entry with custom classes. For simpler replication, we have tried to replicate this issue with the Entry control directly, and we were able to create the warning in that simpler sample too.
The binding is working fine, but I was able to receive multiple warnings due to this same issue.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/manojSF3414/SampleMAUI
Version with bug
8.0.80 SR8
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows
Affected platform versions
Android 14, Windows 10.0.19041.0
Did you find any workaround?
No.
Relevant log output