kind property

WebUISearchActivatedEventArgs.kind property

Gets the activation type.

Syntax


var kind = webUISearchActivatedEventArgs.kind;

Property value

Type: ActivationKind

The activationKind.search enumeration value.

Examples

The Search contract sample demonstrates how to determine when an app is activated for search in the app's activated event handler.


var detail = e.detail;
// Check if this is search activation
if (detail.kind === Windows.ApplicationModel.Activation.ActivationKind.search) {
    sdkSample.displayStatus("Activated for Search with the query: " + detail.queryText);
    if (detail.queryText === "") {
        // Navigate to your landing page since the user is pre-scoping to your app
    } else {
        // Display results in UI for detail.queryText and detail.language
        // detail.language represents user's locale
    }
} else { // Non Search Activation
    // Other Activation Code
}


In the sample, e is a webUISearchActivatedEventArgs object. The sample checks the e.queryText property to determine whether the app should display results for the query.

Requirements (Windows 10 device family)

Device family

Desktop, introduced version 10.0.10240.0
Mobile, introduced version 10.0.10240.0

API contract

Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract, introduced version 1.0

Namespace

Windows.UI.WebUI

Metadata

Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.WebUI

Metadata

Windows.winmd

See also

WebUISearchActivatedEventArgs

 

 

Show:
© 2016 Microsoft