OnActivated method is not getting called when metro app is lauched by clicking on the tile RRS feed

  • Question

  • I am developing a metro app and want certain code to be executed when a tile is clicked. I came across some doumentation saying  onActivated(overiding this method) gets called when application is activated using tile, but onActivated is never executed. Need Help.
    Tuesday, December 20, 2011 6:51 AM


All replies

  • Hi Raja,

    This sample shows how to use the activation events:


    You can follow this.  The activation event is not fired every time the tile is clicked.  If the application is already running, clicking the tile will simply bring your application to the foreground.


    Jeff Sanders (MSFT)
    Tuesday, December 20, 2011 1:16 PM
  • Thanks for the quick reply, Jeff.

    Is there any event that gets fired every time the tile is clicked?

    I am asking this because, I cannot use GotFocus for some reasons.




    Tuesday, December 20, 2011 1:33 PM
  • Hey Raja,

    No unfortunately.  I was looking to do that myself and there is nothing that is raised.  Basically once the app is running, it is running as if you are kicking it off.  When a user returns to your app (via click or sweeping through the running apps) it should be as if they never left it.  Once I thought of it that way, I relaxed my desire for that event. 

    What would be the use-case for you needing this event?


    Jeff Sanders (MSFT)
    Tuesday, December 20, 2011 1:50 PM