private void ScrollAndFocus() { //FileContents.Focus(); Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => { FileContents.ScrollIntoView(FileContents.SelectedItem); })); }