Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combobox binding issue in ContentControl #8843

Closed
metalvalor opened this issue Sep 5, 2023 · 2 comments
Closed

Combobox binding issue in ContentControl #8843

metalvalor opened this issue Sep 5, 2023 · 2 comments
Labels
area-ComboBox bug Something isn't working team-Controls Issue for the Controls team

Comments

@metalvalor
Copy link

Describe the bug

In a ContentControl, when the binded Content changes, the ComboBox SelectedItem in the DataTemplate is set to NULL as well as the binded property in the model.

It happens only when the DataTemplate returned by the DataTemplateSelector remains the same.

This issue was not present in WPF.

Steps to reproduce the bug

Clone the repository.

Run the project WinUISample

  1. Click on Expense 1 (Category A is selected)
  2. Click on Expense 2 (Category B is selected)
  3. Click on Expense 1 (Category is null)

When the DataTemplate changes the category remains

  1. Click on Expense 4 (Category A is selected)
  2. Click on Expense special (Category B is selected, DataTemplate is different)
  3. Click on Expense 4 (Category A is selected)
  4. Selecting Expense 3 will set Category to null on Expense 4

Expected behavior

The category need to stay on the right value.

The WPFSample included in the solution implementing the same logic works as expected.

Screenshots

No response

NuGet package version

Windows App SDK 1.4.0: 1.4.230822000

Packaging type

No response

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

No response

@ghost1372
Copy link
Contributor

@karkarl
Copy link
Contributor

karkarl commented Dec 26, 2024

Resolving as dupe of #10232

@karkarl karkarl closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ComboBox bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

5 participants