Bagikan melalui


CortanaSettings Kelas

Definisi

Menyediakan akses ke pengaturan 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
Warisan
Object Platform::Object IInspectable CortanaSettings
Atribut

Persyaratan Windows

Rangkaian perangkat
Windows IoT Extension SDK (diperkenalkan dalam 10.0.15063.0)
API contract
Windows.System.SystemManagementContract (diperkenalkan dalam v3.0)

Keterangan

Kelas CortanaSettings mengharuskan hal berikut ditambahkan ke Package.appmanifest:

  • Ke <Paket>
    • IgnorableNamespaces="iot"
  • Di bawah <Kapabilitas>
    • <iot:Capability Name="systemManagement"/>

Properti

HasUserConsentToVoiceActivation

Mendapatkan apakah pengguna telah menyetujui aktivasi suara.

IsVoiceActivationEnabled

Mendapatkan atau mengatur apakah aktivasi suara diaktifkan.

Metode

GetDefault()

Mengambil pengaturan Cortana untuk pengguna saat ini.

IsSupported()

Mengambil apakah pengaturan Cortana didukung.

Berlaku untuk