Skip to content

Binding of Entry control seems to break after entering text in Entry #16859

@ppluijten

Description

@ppluijten

Description

When using an Entry control in a page with a Binding to an ObservableProperty of type string in a ViewModel, updating its Text content from that ViewModel works. After editing the Entry in the app (using the keyboard), the entry seems to stop "listening" to the ObservableProperty - its Text value cannot be set anymore from the ViewModel. To demontrate this see the animation below, where we added three Entries to show the effect: all Entries update each other via the Binding and the Button, but as soon as some text is entered manually in an entry, it no longer updates via the Binding.

repro-binding
__

Steps to Reproduce

  1. Create an empty .NET MAUI project
  2. Add one or more Entry controls to a page (e.g. the MainPage)
  3. Bind their Text to a property of the MainPage's ViewModel
  4. Add a button to that Page
  5. Let that button update the value of the Binding
  6. Run the app
  7. Click the button (and see that it works)
  8. Edit the text of one of the Entry controls
  9. Click the button again and see that the text of the edited Entry no longer updates

Link to public reproduction project repository

https://github.com/ppluijten/dotnet-maui-binding-issue-repro

Version with bug

8.0.0-preview.7.8842

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 13, SDK 33

Did you find any workaround?

Not yet

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions