private bool TryScrollToSelectedItem() { var selectedItem = LayoutList.SelectedItem; if (selectedItem == null) { return(false); } LayoutList.ScrollIntoView(selectedItem); return(true); }