CortanaActionableInsightsOptions.SurroundingText 属性

定义

提供给 CortanaActionableInsights 的内容周围上下文中的文本,用于显示见解。

public:
 property Platform::String ^ SurroundingText { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring SurroundingText();

void SurroundingText(winrt::hstring value);
/// [get: Windows.Foundation.Metadata.Deprecated("CortanaActionableInsightsOptions is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
/// [set: Windows.Foundation.Metadata.Deprecated("CortanaActionableInsightsOptions is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
winrt::hstring SurroundingText();

void SurroundingText(winrt::hstring value);
public string SurroundingText { get; set; }
public string SurroundingText { [Windows.Foundation.Metadata.Deprecated("CortanaActionableInsightsOptions is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")] get; [Windows.Foundation.Metadata.Deprecated("CortanaActionableInsightsOptions is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")] set; }
var string = cortanaActionableInsightsOptions.surroundingText;
cortanaActionableInsightsOptions.surroundingText = string;
Public Property SurroundingText As String

属性值

String

Platform::String

winrt::hstring

围绕内容的文本上下文 (最大长度为 3000 个字符) 。 此值可为 NULL。

属性

Windows 要求

应用功能
cortanaSurface

注解

如果使用超过最大长度的字符串调用 setter,则会引发异常。

CortanaActionableInsights 类要求将以下内容添加到 Package.appxmanifest:

  • 要 <打包>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • 在“功能”下<>
    • <rescap:capability name="cortanaSurface"/>

适用于