Package.Launch | launch method

Applies to Windows Phone only

Windows Phone only. Launches the specified application.

Syntax


package.launch(parameters);

Parameters

parameters

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The navigation URI that specifies the page to launch and optional parameters. Use an empty string to specify the default page for the app.

Remarks

The Launch parameter has the same format as the NavigationUri format. The following table shows some examples:

ScenarioLaunch parameterExample
You just want to launch the app with the default page.Specify an empty string.pkg.Launch("");
You want to launch to a particular XAML page.Start with a forward slash (/) followed by the XAML page name.pkg.Launch("/Page1.xaml");
You want to pass parameters to the default page.Start with a question mark (?) followed by name/value pairs. Use an equal sign (=) between the name and value. Separate multiple name/value pairs with an ampersand (&).pkg.Launch("?content=1234&param2=test");
You want to launch to a particular XAML page and pass in parameters.Use a combination of the previous two examples.pkg.Launch("/Page1.xaml?content=1234&param2=test ");

 

Requirements

Minimum supported client

None supported

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

Namespace

Windows.ApplicationModel
Windows::ApplicationModel [C++]

Metadata

Windows.winmd

See also

Package

 

 

Show:
© 2014 Microsoft