CortanaSettings 类

定义

提供对 Cortana 设置的访问权限。

public ref class CortanaSettings sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.System.SystemManagementContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CortanaSettings final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.System.SystemManagementContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Deprecated("CortanaSettings is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 458752, "Windows.System.SystemManagementContract")]
class CortanaSettings final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.System.SystemManagementContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CortanaSettings
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.System.SystemManagementContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Deprecated("CortanaSettings is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 458752, "Windows.System.SystemManagementContract")]
public sealed class CortanaSettings
Public NotInheritable Class CortanaSettings
继承
Object Platform::Object IInspectable CortanaSettings
属性

Windows 要求

设备系列
Windows IoT Extension SDK (在 10.0.15063.0 中引入)
API contract
Windows.System.SystemManagementContract (在 v3.0 中引入)

注解

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

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

属性

HasUserConsentToVoiceActivation

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

IsVoiceActivationEnabled

获取或设置是否启用语音激活。

方法

GetDefault()

检索当前用户的 Cortana 设置。

IsSupported()

检索是否支持 Cortana 设置。

适用于