Hello,
I am using the XamComboEditor control and it is being bound to a list of string property. When the user loads the view, the XamComboEditor is assigned a list with one string (say 'xx'). After a while, the logic behind the view, will assign a new list with 2 strings (say 'xx' and 'yy') to the XamComboEditor. For some reason, when the user clicks on the XamComboEditor while using the application, the dropdown list will show only 1 row, there will also be a scroll bar with two small arrows showing up within the same row, the user can also drag the dropdown list to see all the records; after dragging the list the user will be able to see the two records ('xx' and 'yy'). I did try a few tricks like resetting the dropdown list to null before setting a new value, but still I am getting a shrinked list for some reason after re-assigning the list of strings. I have never noticed this behaviour before, it seems it only occurs if the second list of strings (that will be assigned to the control) does contain a record that was already there in the control?! Please help me to reset the dropdown list using the MVVM pattern whenever I assign a new list of items to the property bound to the control. Thank you.
Best regards,
Sherif
Hello Sherif,
Thank you for contacting Infragistics Developer Support.
I tried to reproduce your issue but was unsuccessful in doing so. In order to reproduce the issue I tried
Binding the ItemsSource to an ObservableCollection and changing the data in the collection
Setting the control’s ItemSource to a new collection (original and new of type ObservableCollection).
Setting the control’s ItemSource to a new collection (original and new of type List).
In all instances, the behavior was as expected. Please note, in Infragistics for WPF there are actually two XamComboEditor controls
The shared (SL/WPF) control in Infragistics.Controls.Editors (http://schemas.infragistics.com/xaml)
The WPF specific control in Infragistics.Windows.Editors (http://schemas.infragistics.com/xaml/wpf)
The sample includes tests for both of these controls as I was unsure which control you are using.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 15.1.20151.1000 in Infragistics for WPF 2015 Volume 1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.
Sincerely,
Valerie
Software Developer
Infragistics
www.infragistics.com/support
Were you able to test my sample?
Hello Valerie,
Thanks a lot. Sorry, I was away for sometime. Your example did work. Thanks.