Browse Source

When using SDA the initialization of recent projects on start page, because after await another thread tried to access ItemSource

pull/759/head
Gerald Lochner 9 years ago
parent
commit
215ca8ccff
  1. 13
      src/AddIns/Misc/StartPage/Project/Src/RecentProjectsControl.xaml.cs

13
src/AddIns/Misc/StartPage/Project/Src/RecentProjectsControl.xaml.cs

@ -79,10 +79,15 @@ namespace ICSharpCode.StartPage
} }
} }
}); });
if (items.Count > 0) {
lastProjectsListView.ItemsSource = items; await Dispatcher.InvokeAsync(delegate
lastProjectsListView.Visibility = Visibility.Visible; {
} if (items.Count > 0)
{
lastProjectsListView.ItemsSource = items;
lastProjectsListView.Visibility = Visibility.Visible;
}
});
} }
class RecentOpenItem : INotifyPropertyChanged class RecentOpenItem : INotifyPropertyChanged

Loading…
Cancel
Save