WebUISearchActivatedEventArgs.kind property

Applies to Windows and Windows Phone

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

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:
© 2014 Microsoft