AssignedAccessSettings.GetDefault 方法

定义

检索默认分配的访问权限设置。

public:
 static AssignedAccessSettings ^ GetDefault();
 static AssignedAccessSettings GetDefault();
public static AssignedAccessSettings GetDefault();
function getDefault()
Public Shared Function GetDefault () As AssignedAccessSettings

返回

包含用户当前分配的访问权限设置的设置对象。

示例

using Windows.System.UserProfile; 

// Retrieve AssignedAccessSettings for current user
void GetAssignedAccessSettingsForCurrentUser()
{
    AssignedAccessSettings settings = AssignedAccessSettings.GetDefault();
    var assignedAccessEnabled = settings.IsEnabled;
    var singleAppKioskMode = settings.IsSingleAppKioskMode;

    // determine the behavior according to the AssignedAccessSettings
}

适用于