Skip to content

Commit bb6233e

Browse files
committed
WIP
1 parent 0ce4553 commit bb6233e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,15 @@ private void UpdateSelection(object oldSelection, object newSelection)
212212
{
213213
OnSelectionChanged(new SelectionChangedEventArgs(new List<object> { oldSelection }, new List<object> { newSelection }));
214214

215+
if (FocusManager.FindFirstFocusableElement(_detailsPresenter) is DependencyObject focuable)
216+
{
217+
SetFocus(ListDetailsViewState.Details);
218+
}
219+
else
220+
{
221+
SetFocus(ListDetailsViewState.List);
222+
}
223+
215224
UpdateView(true);
216225

217226
// If there is no selection, do not remove the DetailsPresenter content but let it animate out.

0 commit comments

Comments
 (0)