ToolStripDropDown top scroll button cannot scroll to the visible item before a hidden item
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 1d 13m
- Merged PRs (30d)
- 85
Description
### .NET version
.NET 11 SDK build: 11.0.100-preview.5.26256.117
### Did it work in .NET Framework?
No
### Did it work in any of the earlier releases of .NET Core or .NET 5+?
No, repro in previous .NET versions
### Issue description
ToolStripDropDown scrolling behavior issue when hidden items exist in the dropdown.
Given four dropdown items:
- A
- B
- C
- D
with: `B.Visible = false;`
At runtime, the dropdown can scroll downward correctly, but upward scrolling using the top scroll button stops at` C` and cannot continue scrolling back to `A`, which is the visible item immediately before the hidden item` B`.
https://github.com/user-attachments/assets/29eca076-274a-4d00-8c2d-8f0e417981b9
### Steps to reproduce
1. Create a ToolStripDropDownButton (or similar dropdown control).
2. Add four dropdown items:
- A
- B
- C
- D
3. Set: `B.Visible = false;`
4. Configure the dropdown height so scrolling buttons appear.
5. Run the application.
6. Scroll downward until lower items are visible.
7. Use the top scroll button to scroll upward.
Contributor guide
Assessment
This issue has not been assessed yet.