CortanaSettings.HasUserConsentToVoiceActivation 属性

定义

获取用户是否已同意语音激活。

public:
 property bool HasUserConsentToVoiceActivation { bool get(); };
bool HasUserConsentToVoiceActivation();
/// [get: Windows.Foundation.Metadata.Deprecated("ICortanaSettings is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 458752, "Windows.System.SystemManagementContract")]
bool HasUserConsentToVoiceActivation();
public bool HasUserConsentToVoiceActivation { get; }
public bool HasUserConsentToVoiceActivation { [Windows.Foundation.Metadata.Deprecated("ICortanaSettings is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 458752, "Windows.System.SystemManagementContract")] get; }
var boolean = cortanaSettings.hasUserConsentToVoiceActivation;
Public ReadOnly Property HasUserConsentToVoiceActivation As Boolean

属性值

Boolean

bool

如果用户已同意,则为 true。 否则为 false

属性

注解

CortanaSettings 类要求将以下内容添加到 Package.appmanifest:

  • 要 <打包>
    • IgnorableNamespaces="iot"
  • 在“功能”下<>
    • <iot:Capability Name="systemManagement"/>

适用于