Skip to content

Nullable Enums do not bind in XAML #24139

@aritchie

Description

@aritchie

Description

Nullable enums fail to bind for a bindable property within a custom control. The setter isn't even hit.

Steps to Reproduce

  1. Create a control that has a nullable enum as a bindable property
  2. Create a page to use control
  3. Create a viewmodel
  4. Wire up binding and observe

Attached sample is a m

Link to public reproduction project repository

https://github.com/aritchie/maui_nullable_enum_repro

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

iOS, Android

Affected platform versions

All

Did you find any workaround?

Don't use nullable enums. Add an unset/none value to the enum.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-xamlXAML, CSS, Triggers, Behaviorst/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions