Skip to content

Commit 2d927dc

Browse files
authored
Modify the TreeListViewItem.OnKeyDown handler to mark the KeyEventArgs as handled. (#3521)
1 parent 2a085a2 commit 2d927dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

MaterialDesignThemes.Wpf/TreeListViewItem.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public TreeListViewItem()
1515

1616
public TreeListViewItem(TreeListView treeListView)
1717
{
18-
TreeListView = treeListView;
18+
TreeListView = treeListView;
1919
}
2020

2121
private TreeListViewContentPresenter? ContentPresenter { get; set; }
@@ -183,6 +183,7 @@ protected override void OnKeyDown(KeyEventArgs e)
183183
{
184184
case Key.Right:
185185
IsExpanded = true;
186+
e.Handled = true;
186187
break;
187188
case Key.Left:
188189
if (IsExpanded)
@@ -193,6 +194,7 @@ protected override void OnKeyDown(KeyEventArgs e)
193194
{
194195
TreeListView?.MoveSelectionToParent(this);
195196
}
197+
e.Handled = true;
196198
break;
197199
}
198200
}

0 commit comments

Comments
 (0)