locked
Start parameter for app

    Question

  • I would like to simulate the behaviour of a secondary tile, when the user activates it in the start menu. I see currently no way to start my metro app with command line arguments. How would I test secondary tiles?
    Thursday, February 02, 2012 1:38 PM

Answers

  • Ah, sorry I misunderstood!

    I will give you an example:

    Open the SecondaryTiles sample.

    Build and deploy it.

    Run it and create a secondary tile, Pin it so the start menu.

    Hit Alt-F4 to kill the process or use task manager to kill the Secondary Tiles Process.

    Right click on the project in the solution explorer, choose Properties from the context menu and click on Debugging.  Change Launch Application to No. 

    Then hit start the debugger by hitting F5 (or however you want)...

    Put a BP on this: if (arg.arguments !== '') {

    Click on the Secondary Tile you pinned previously and you will break into the debugger as it starts.

     

    -Jeff

     


    Jeff Sanders (MSFT)
    Thursday, February 02, 2012 3:02 PM
    Moderator

All replies

  • Hi Phil,

    This sample has an example of that:

    http://code.msdn.microsoft.com/windowsapps/Secondary-Tiles-Sample-edf2a178

    And here is the documentation (see step 4):

    http://msdn.microsoft.com/en-us/library/windows/apps/hh465102.aspx

     


    Jeff Sanders (MSFT)
    Thursday, February 02, 2012 2:24 PM
    Moderator
  • Hello Jeff,

    I have seen the app, but I wonder how can I can start the app from DevStudio with start aguments to "simulate" the way my app would be started as secondary tile app.

    Thursday, February 02, 2012 2:27 PM
  • Ah, sorry I misunderstood!

    I will give you an example:

    Open the SecondaryTiles sample.

    Build and deploy it.

    Run it and create a secondary tile, Pin it so the start menu.

    Hit Alt-F4 to kill the process or use task manager to kill the Secondary Tiles Process.

    Right click on the project in the solution explorer, choose Properties from the context menu and click on Debugging.  Change Launch Application to No. 

    Then hit start the debugger by hitting F5 (or however you want)...

    Put a BP on this: if (arg.arguments !== '') {

    Click on the Secondary Tile you pinned previously and you will break into the debugger as it starts.

     

    -Jeff

     


    Jeff Sanders (MSFT)
    Thursday, February 02, 2012 3:02 PM
    Moderator
  • Ah thank you Jeff! I will try it out!
    Thursday, February 02, 2012 3:29 PM