Share via


CortanaActionableInsightsOptions.SurroundingText Property

Definition

Text from the surrounding context of the content supplied to CortanaActionableInsights for showing insights.

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

Property Value

String

Platform::String

winrt::hstring

The textual context surrounding the content (maximum length of 3000 characters). This value can be null.

Attributes

Windows requirements

App capabilities
cortanaSurface

Remarks

If the setter is called with a string exceeding the maximum length, an exception is thrown.

The CortanaActionableInsights class requires the following be added to the Package.appxmanifest:

  • To <Package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • Under <Capabilities>
    • <rescap:capability name="cortanaSurface"/>

Applies to