コード例 #1
0
        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;
        }
コード例 #2
0
        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);
        }