Aug 072012
 August 7, 2012  Posted by at 2:56 am 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 Response to “WinRT/Metro App Q n’ A: Can I set the MaxDropDownHeight on a ComboBox?”

  1. […] WinRT/Metro App Q n’ A: Can I set the MaxDropDownHeight on a ComboBox? (Iris Classon) […]

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



What is 14 + 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) :-)