August 7, 2012  Posted by Iris Classon at 2:56 am Iris' blog, Metro, Metro App Help (code and design), WinRT  Add comments

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)

After a 2 month long discussion on MSDN this is the answer I got:

 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.

One comment on “WinRT/Metro App Q n’ A: Can I set the MaxDropDownHeight on a ComboBox?

  1. Pingback: Dew Drop – August 7, 2012 (#1,379) | Alvin Ashcraft's Morning Dew

Leave a Reply

Your email address will not be published. Required fields are marked *

*

HTML tags are not allowed.

What is 7 + 12 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)