AccountsSettingsPane 클래스

정의

계정 창을 표시하고 계정 플라이아웃이 표시될 때 앱이 콜백을 등록할 수 있도록 하는 메서드를 제공합니다.

public ref class AccountsSettingsPane sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
class AccountsSettingsPane final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
public sealed class AccountsSettingsPane
Public NotInheritable Class AccountsSettingsPane
상속
Object Platform::Object IInspectable AccountsSettingsPane
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

설명

앱은 앱이 표시하는 모든 웹 계정 공급자, 웹 계정, 전역 계정 명령 및 자격 증명 보관 자격 증명에 대한 계정 메타데이터를 콜백에 제공합니다. 계정 공급자의 예로는 Facebook, LinkedIn 및 Twitter가 있습니다.

Windows.UI.ApplicationSettings 네임스페이스의 계정 및 자격 증명 명령 클래스는 Windows.UI.ApplicationSettings 네임스페이스의 데이터 개체와 일치합니다.

데이터 개체(Windows.Security.Credentials) UI 개체(Windows.UI.ApplicationSettings)
WebAccount WebAccountCommand
WebAccountProvider WebAccountProviderCommand
PasswordCredential CredentialCommand

데스크톱 애플리케이션

데스크톱 앱의 경우 AccountSettingsPane 클래스를 사용하는 대신 아래에 설명된 대로 interop API를 사용해야 합니다.

다음은 C#(.NET 6 이상)에서 AccountSettingsPaneInterop 클래스를 사용하는 방법에 대한 예제입니다.

private void LoginButton_Click(object sender, RoutedEventArgs e)
{
    // Retrieve the window handle for whichever UI framework being used (WinUI 3, WPF, WinForms)
    var hwnd = ...
    // Call methods from the interop class, passing in the window handle
    await AccountsSettingsPaneInterop.ShowManageAccountsForWindowAsync(hwnd);
}

버전 기록

Windows 버전 SDK 버전 추가된 값
1607 14393 ShowAddAccountAsync
1607 14393 ShowManageAccountsAsync
1803 17134 ShowAddAccountForUserAsync
1803 17134 ShowManageAccountsForUserAsync

메서드

GetForCurrentView()

현재 앱 보기(CoreWindow 사용)와 연결된 AccountsSettingsPane 개체를 가져옵니다.

Show()

계정 설정 창을 표시합니다.

ShowAddAccountAsync()

계정 추가 화면을 표시합니다.

ShowAddAccountForUserAsync(User)

지정된 사용자의 계정 추가 화면을 표시합니다.

ShowManageAccountsAsync()

계정 관리 화면을 표시합니다.

ShowManageAccountsForUserAsync(User)

지정된 사용자의 계정 관리 화면을 표시합니다.

이벤트

AccountCommandsRequested

사용자가 계정 창을 열 때 발생합니다. 이 이벤트를 처리하면 앱이 계정 명령을 초기화하고 사용자가 창을 닫을 때까지 UI를 일시 중지할 수 있습니다.

적용 대상

추가 정보