Scroll behavior on ComboBox element is broken on Touch
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When using ComboBox with a touch display, the touch behavior does not allow for a "drag" style scrolling.
Making a new WPF Application, without WPF-UI, the ComboBox works just fine.
When made in a new fresh WPF UI project, scrolling no longer works.
To Reproduce
Make a new WPF UI Project.
Go into Pages > Dashboard.xaml and add the following code for a ComboBox:
<ComboBox Grid.Column="0"
MaxDropDownHeight="200"
BorderThickness="2"
ScrollViewer.VerticalScrollBarVisibility="Visible"
Name="ComboBox"
FontSize="20">
<ComboBoxItem Content="Test1"/>
<ComboBoxItem Content="Test2"/>
<ComboBoxItem Content="Test3"/>
<ComboBoxItem Content="Test4"/>
<ComboBoxItem Content="Test5"/>
<ComboBoxItem Content="Test6"/>
<ComboBoxItem Content="Test7"/>
<ComboBoxItem Content="Test8"/>
<ComboBoxItem Content="Test9"/>
<ComboBoxItem Content="Test10"/>
<ComboBoxItem Content="Test11"/>
<ComboBoxItem Content="Test12"/>
</ComboBox>
I've tried to make it "look nice" for this text editor, but it seems line breaks do not work
Note, the ScrollViewer property is set so that you can actually see the scroll bar.
When using a touch screen the behavior does not work as a "swipe" or "drag" to scroll.
To actually scroll, you have to Press and Drag to the top or bottom of the dropdown to scroll up and down.
Expected behavior
When "swiping" or "dragging", like one would do on a smartphone to scroll, the dropdown does not scroll like it does in a normal WPF application.
Screenshots
No response
OS version
Windows 10
.NET version
.NET 6.0
WPF-UI NuGet version
2.1.0 - 3.0.0-Preview4
Additional context
It doesn't matter which version I use, whether it's 2.1.0 with my current project or if it's 3.0.0 with a new project, it's the same behavior
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ComboBox reproduction in Pages/Dashboard.xaml and compare touch scrolling in a fresh WPF UI project with a plain WPF application. Verify the dropdown's touch behavior on Windows 10 with the reported .NET and WPF-UI versions; done means swipe or drag gestures scroll the ComboBox dropdown normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100