WinRT/Metro App Q n’ A: Can I set the MaxDropDownHeight on a ComboBox?
In short- no (2012-07-08). I sure wish i had gotten a short answer for that when I was wondering why the ComboBox wouldn’t respect the MaxDropDownHeight property, since you would expect it to when you look at the documentation for the ComboBox properties.
This wont actually work (2012-07-08)
Looks like this behavior was removed in favor of the custom layout logic for centering. As a result the MaxDropDownHeight is ignored. You would have to resort to custom layout logic of the popup on your own – calculating how to center it and such. You would need to derive from ComboBox and override logic there. Not easy to do at all, sorry.
You could use a virtualizing stackpanel and set a maxheight for it, but the popup wont be centered when opened if one of the lower items in the list is selected. I haven’t had the time to sit down a find a good fix for this, but when and if I do I’ll share.
Last modified on 2012-08-07