Is there an equivalent for ComboBox.MaxDropDownItems in UWP XAML?

534 Views Asked by At

WPF had a property on ComboBoxes called MaxDropDownItems that allowed you to set the number of combobox items visible in the popup without scrolling. It seems that that property doesn't exist in UWPs. Is there some equivalent that achieves the same effect? I'm trying to set the number of items visible before scrolling, but it seems to be fixed at nine by default, and I can't find anything pertinent in generic.xaml.

1

There are 1 best solutions below

0
On

As you've know ComboBox.MaxDropDownItems Property is not available in UWP apps. The equivalent property in UWP is ComboBox.MaxDropDownHeight property. With this property, we can set the maximum height for a combo box drop-down. This value does not need to be precise. ComboBox will automatically adjust the number of visible items according to MaxDropDownHeight. You can calculate an approximate value to achieve what yo want.