Open
Description
openedon Sep 5, 2023
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
- Click on Expense 1 (Category A is selected)
- Click on Expense 2 (Category B is selected)
- Click on Expense 1 (Category is null)
When the DataTemplate changes the category remains
- Click on Expense 4 (Category A is selected)
- Click on Expense special (Category B is selected, DataTemplate is different)
- Click on Expense 4 (Category A is selected)
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment