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

Bindable properties of nullable types do not get change notifications for null #5274

@vvgeorgiev

Description

@vvgeorgiev

Description

When BindableProperty of nullable type (e.g. bool?) is databound to a property of the same type and that second property is set to null, the bindable property does not receive a change notification.

Steps to Reproduce

  1. Run the attached project. There are 4 custom labels. The first and second have bindable properties of type bool? and double? databound to values in the viewmodel. The third and fourth have their Text property (of type string) bound to the same properties in viewmodel.
  2. Click the "Toggle Values" button. The viewmodel's properties are set to null. The former two labels keep their value as they do not receive change notification. The latter two label's Text is cleared.
  3. Click the "Toggle Values" button again. The viewmodel's properties are set to 'false' and 0.0. All labels display correct text as notifications are received.

Expected Behavior

On step 2. the former labels should display "null" (see line 35 in MyLabel.cs)

Actual Behavior

On step 2. the former labels do not change their text.

Basic Information

  • Version with issue: 3.5.0.129452
  • Last known good version: 3.4.0.
  • IDE: VS 2017 Enterprise 15.9.6
  • Platform Target Frameworks:
    • iOS: 12.1
    • Android: 9.0
    • UWP: 16299
  • Android Support Library Version: 28.0.0.1
  • Nuget Packages:
  • Affected Devices:

Screenshots

Reproduction Link

Nullables.zip

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions