I am not sure if the multiselect or checkbox visible settings have anything to do with this but I have noticed that the popup/dropdown does not grow to the MaxDropDownHeight specified on the control causing the vertical scroll bar to appear for as few as 3 items. I have 2 others ComboEditors that have 2 items displayed (but not multiselect) and they work correctly. I have a custom style for the ComboEditor copied from the dark metro theme and can clearly see that the border in question (RootPopupElement) has the height set to auto and the max height set to {TemplateBinding MaxDropDownHeight}. However, when the application is running, using snoop, I see that the border now has a specific height set to 92 (max height is set to 350). I have code that runs everytime the popup opens that sets the height of that border back to NaN to fix the issue but this seems like this should not be necessary. Can anyone explain this behavior?
Hello Mike and thank you for posting!
I have created a sample project based on your description (I am using the default dark metro style as I do not know what customizations are made in yours). On my side the dropdown height depends on the MaxDropDownHeight property. Could you please have a look at the attached sample and modified it so that it reproduces the issue? Thank you.
Hi Maria,
Yes, your sample also reproduces the problem I am experiencing. I commented out all but 4 products in the sample code and when the dropdown appears, even though all 4 items can fit within the 250 max height specified, the actual height is insufficient to fit all 4 and therefore the vertical scrollbar appears. My question is why does the dropdown make itself too small to fit all items even when the max height can accommodate all items and remove the scrollbar? Looking through snoop I can see a specific height has been added to the RootPopupElement when that does not need to be done (as far as I can tell). If that value stays unset then it behaves the way I expect it to.