You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a ListView with a datatemplate that represents the items in editable combo boxes, the first time a custom value is entered into the combo box the custom value gets reset to the previous value. This only occurs if the custom value is overwriting a 'preset' value, it does not occur if the custom value is overwriting another custom value. The GIF explains this better.
Steps to reproduce the bug
Create a ListView in XAML like this:
<!--StringVector is a vector of string values-->
<ListView ItemsSource="{x:Bind StringVector}">
<ListView.Resources>
<!--PresetCVS is the vector of preset allowed string values, for the combo box dropdown-->
<CollectionViewSource x:Key="PresetCVS"
x:Name="PresetCVS" />
</ListView.Resources>
<ListView.ItemTemplate>
<DataTemplate x:DataType="x:String">
<ComboBox IsEditable="True"
IsSynchronizedWithCurrentItem="False"
Text="{Binding}"
ItemsSource="{Binding Source={StaticResource PresetCVS}}">
</ComboBox>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
In the code behind, initialize StringVector as an observable vector of strings, and populate PresetCVS with some 'preset' allowed string values. For example, this is what I did in c++:
Then, run the application and try to edit the combo box that contains the preset value. Upon first try, the new value gets 'reset' to the previous value. Upon second try, the edit goes through successfully. This issue does not exist when editing the combo box that already contains a custom value.
Expected behavior
The change should go through upon the first try.
Screenshots
NuGet package version
None
Windows version
Windows Insider Build (xxxxx)
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When using a ListView with a datatemplate that represents the items in editable combo boxes, the first time a custom value is entered into the combo box the custom value gets reset to the previous value. This only occurs if the custom value is overwriting a 'preset' value, it does not occur if the custom value is overwriting another custom value. The GIF explains this better.
Steps to reproduce the bug
Create a ListView in XAML like this:
In the code behind, initialize StringVector as an observable vector of strings, and populate PresetCVS with some 'preset' allowed string values. For example, this is what I did in c++:
Then, run the application and try to edit the combo box that contains the preset value. Upon first try, the new value gets 'reset' to the previous value. Upon second try, the edit goes through successfully. This issue does not exist when editing the combo box that already contains a custom value.
Expected behavior
The change should go through upon the first try.
Screenshots
NuGet package version
None
Windows version
Windows Insider Build (xxxxx)
Additional context
No response
The text was updated successfully, but these errors were encountered: