Skip to content

In ComboBox, binding Enum value to SelectedValue is not working #10990

@sudharsan-narayanan

Description

@sudharsan-narayanan

Describe the bug

The issue is that binding an Enum to a ComboBox does not work as expected. We checked in a simple sample with ComboBox. When binding an Enum value to the SelectedValue property in ComboBox, the selected value is not displayed. However, binding a string value to the SelectedValue property works correctly, and the selected item is shown as expected. We have attached the sample for reference.

Why is this important?

It should be selected when we provide a any selected Item with that.

Steps to reproduce the bug

  1. Run the sample.
  2. Note the Enum combobox will not select the item is not displayed.
  3. In DropDown, the item 1 is selected initially.

ComboBoxEnum.zip

Actual behavior

Given Enum item is not selected.

Expected behavior

Given Enum item should be selected.

Screenshots

Image

NuGet package version

None

Windows version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions