private async Task<Window> showFriendSettingsWindow(FriendViewModel friend) { var friendSettingsWindow = new FriendSettingsWindow(); friendSettingsWindow.Closed += (window, _) => openedWindows.Remove((Window)window); openedWindows.Add(friendSettingsWindow); friendSettingsWindow.DataContext = friend; friendSettingsWindow.Show(); await Task.Delay(10); friendSettingsWindow.Activate(); friendSettingsWindow.Focus(); return friendSettingsWindow; }
private async Task <Window> showFriendSettingsWindow(FriendViewModel friend) { var friendSettingsWindow = new FriendSettingsWindow(); friendSettingsWindow.Closed += (window, _) => openedWindows.Remove((Window)window); openedWindows.Add(friendSettingsWindow); friendSettingsWindow.DataContext = friend; friendSettingsWindow.Show(); await Task.Delay(10); friendSettingsWindow.Activate(); friendSettingsWindow.Focus(); return(friendSettingsWindow); }