Skip to content

Commit 0c7cf48

Browse files
committed
ListDetailsView: unfocuse all children in details on selection changed
1 parent 81504ce commit 0c7cf48

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Microsoft.Toolkit.Uwp.UI.Controls.Layout/ListDetailsView/ListDetailsView.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Collections.Generic;
6+
using System.Linq;
67
using Windows.ApplicationModel;
78
using Windows.UI.Core;
89
using Windows.UI.Xaml;
@@ -292,6 +293,11 @@ private void SetDetailsContent()
292293
{
293294
if (_detailsPresenter != null)
294295
{
296+
foreach(var child in _detailsPresenter.FindChildren().OfType<Control>())
297+
{
298+
child.Focus(FocusState.Unfocused);
299+
}
300+
295301
// Update the content template:
296302
if (_detailsPresenter.ContentTemplateSelector != null)
297303
{

0 commit comments

Comments
 (0)