private void RefreshList(NewAccountWindow wnd) { while (wnd.Dispatcher.Invoke(() => { return(wnd.IsLoaded); })) { } Load(); }
private async void CreateButton_Click(object sender, RoutedEventArgs e) { var newAccountWindow = new NewAccountWindow(); newAccountWindow.Show(); await Task.Run(() => RefreshList(newAccountWindow)); }