wpf ComboBox下拉列表只显示9行
时间: 2024-01-21 08:03:30 浏览: 34
您可以通过设置ComboBox的属性"MaxDropDownHeight"来更改下拉列表的最大高度,以显示更多的行。例如,将其设置为"200"可以显示更多的行。下面是一个示例:
```
<ComboBox MaxDropDownHeight="200">
<ComboBoxItem>Item 1</ComboBoxItem>
<ComboBoxItem>Item 2</ComboBoxItem>
<ComboBoxItem>Item 3</ComboBoxItem>
<ComboBoxItem>Item 4</ComboBoxItem>
<ComboBoxItem>Item 5</ComboBoxItem>
<ComboBoxItem>Item 6</ComboBoxItem>
<ComboBoxItem>Item 7</ComboBoxItem>
<ComboBoxItem>Item 8</ComboBoxItem>
<ComboBoxItem>Item 9</ComboBoxItem>
<ComboBoxItem>Item 10</ComboBoxItem>
<ComboBoxItem>Item 11</ComboBoxItem>
<ComboBoxItem>Item 12</ComboBoxItem>
<ComboBoxItem>Item 13</ComboBoxItem>
<ComboBoxItem>Item 14</ComboBoxItem>
<ComboBoxItem>Item 15</ComboBoxItem>
</ComboBox>
```
相关推荐
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)