Skip to content

Commit 18a5cf3

Browse files
committed
Enabling ScrollPattern only when Combobox dropDown is opened
1 parent 31a4f25 commit 18a5cf3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ComboBoxAutomationPeer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,20 @@ override protected string GetClassNameCore()
5151
override public object GetPattern(PatternInterface pattern)
5252
{
5353
object iface = null;
54+
ComboBox owner = (ComboBox)Owner;
5455

5556
if (pattern == PatternInterface.Value)
5657
{
57-
ComboBox owner = (ComboBox)Owner;
5858
if (owner.IsEditable) iface = this;
5959
}
6060
else if(pattern == PatternInterface.ExpandCollapse)
6161
{
6262
iface = this;
6363
}
64+
else if (pattern == PatternInterface.Scroll)
65+
{
66+
if (owner.IsDropDownOpen) iface = this;
67+
}
6468
else
6569
{
6670
iface = base.GetPattern(pattern);

0 commit comments

Comments
 (0)