microsoft / microsoft/microsoft-ui-xaml

Combobox MaxDropDownHeight has no effect if IsEditable is set to true

Open
#10,875 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area-ComboBox bug
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

I can't set the maximum number of items displayed by the combobox dropdown if `IsEditable` is set to true.

```XAML

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9
Item 10
Item 11
Item 12
Item 13
Item 14
Item 15

```

`MaxDropDownHeight` of 400 would display 10 items. I even tried overriding the keyed resource but this still does not work:

```XAML
15
```

### Why is this important?

It's important because sometimes, on some screen sizes, 15 items is too much. The fact that the behaviour is inconsistent, in the sense that `IsEditable = False` will work, makes the combobox an incomplete control.

### Steps to reproduce the bug

Just add a combobox with the snippet above.

### Actual behavior

`MaxDropDownHeight` has no effect.

### Expected behavior

`MaxDropDownHeight` should have effect.

### Screenshots

_No response_

### NuGet package version

WinUI 3 - Windows App SDK 1.8.2: 1.8.251003001

### Windows version

Windows 11 (24H2): Build 26100

### Additional context

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the provided ComboBox XAML in WinUI 3 with IsEditable set to true, then trace the ComboBox editable dropdown and its template or popup entry point. Done means MaxDropDownHeight limits the displayed dropdown height consistently, including when the control is editable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.