CortanaSettings.IsVoiceActivationEnabled 属性

定义

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

public:
 property bool IsVoiceActivationEnabled { bool get(); void set(bool value); };
bool IsVoiceActivationEnabled();

void IsVoiceActivationEnabled(bool value);
/// [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")]
/// [set: 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 IsVoiceActivationEnabled();

void IsVoiceActivationEnabled(bool value);
public bool IsVoiceActivationEnabled { get; set; }
public bool IsVoiceActivationEnabled { [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; [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")] set; }
var boolean = cortanaSettings.isVoiceActivationEnabled;
cortanaSettings.isVoiceActivationEnabled = boolean;
Public Property IsVoiceActivationEnabled As Boolean

属性值

Boolean

bool

如果启用了语音激活,则为 true。 否则为 false

属性

注解

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

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

适用于