共用方式為


AssignedAccessSettings.GetDefault 方法

定義

擷取預設指派的存取設定。

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

傳回

包含使用者目前指派存取設定的 settings 物件。

範例

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
}

適用於