Package.Launch(String) Method

Definition

Windows Phone only. Launches the specified application.

public:
 virtual void Launch(Platform::String ^ parameters) = Launch;
/// [Windows.Foundation.Metadata.Deprecated("Launch may be altered or unavailable for releases after Windows 8.1. Instead, for SmartCardTrigger scenarios use SmartCardTriggerDetails.TryLaunchSelfAsync", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
void Launch(winrt::hstring const& parameters);
/// [Windows.Foundation.Metadata.Deprecated("Launch may be altered or unavailable for releases after Windows 8.1. Instead, for SmartCardTrigger scenarios use SmartCardTriggerDetails.TryLaunchSelfAsync", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
void Launch(winrt::hstring const& parameters);
[Windows.Foundation.Metadata.Deprecated("Launch may be altered or unavailable for releases after Windows 8.1. Instead, for SmartCardTrigger scenarios use SmartCardTriggerDetails.TryLaunchSelfAsync", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public void Launch(string parameters);
[Windows.Foundation.Metadata.Deprecated("Launch may be altered or unavailable for releases after Windows 8.1. Instead, for SmartCardTrigger scenarios use SmartCardTriggerDetails.TryLaunchSelfAsync", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public void Launch(string parameters);
function launch(parameters)
Public Sub Launch (parameters As String)

Parameters

parameters
String

Platform::String

winrt::hstring

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

Attributes

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¶m2=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¶m2=test ");`

Important

The Launch method only works if it is called from a Windows Phone Silverlight app.

Applies to