0

In Silverlight I can get to the command line parameters (actually the URL parameters) by:

private void Application_Startup(object sender, StartupEventArgs e)
{
    this.RootVisual = new MainPage();

    var parameters = e.InitParams;
}

Since LightSwitch is built on top of Silverlight I try to achieve the same thing in a LightSwitch application, but cannot find out how. I have set up an Application_Initialize event handler, but I can only access the LightSwitch Application object, not the actual underlying Silverlight Application (App) object.

On top of this Google was not my friend... :-)

Thanks for your help.

4

1 回答 1

0

Nevermind, I found an alternative:

System.Windows.Browser.HtmlPage.Document.DocumentUri.Query

gives me the parameters in the URL.

Thanks for your time. Paul

于 2012-08-14T14:02:14.593 回答