Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8910137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:36:43+00:00 2026-06-15T03:36:43+00:00

I am referring to http://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx#app_activation // App is an Application public App() { this.InitializeComponent();

  • 0

I am referring to http://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx#app_activation

    // App is an Application
    public App()
    {
        this.InitializeComponent();

        // Doesn't compile
        //this.Activated += OnActivated;

        this.Suspending += OnSuspending;
    }

    protected override void OnActivated(IActivatedEventArgs args)
    {
        System.Diagnostics.Debug.WriteLine("OnActivated");
    }

    private void OnSuspending(object sender, SuspendingEventArgs e)
    {
        var deferral = e.SuspendingOperation.GetDeferral();
        deferral.Complete();
    }

Note, OnActivated will never be triggered. OnSuspending will be triggered, after I quit the app around 30 seconds.

How can I capture Activated event? It is weird that I do not find Activated event in App, although the documentation says so.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:36:44+00:00Added an answer on June 15, 2026 at 3:36 am

    The activation is a little confusing. Take a look at the documentation here:

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

    What you’ll find is that when the user taps the tile, only the OnLaunched event is fired (see documentation here: http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.application.onactivated.aspx )

    The OnActivated is only for special cases outside of the ordinary launch. That would be any one of the following:

    OnFileActivated
    OnSearchActivated
    OnShareTargetActivated
    OnFileOpenPickerActivated
    OnFileSavePickerActivated
    OnCachedFileUpdaterActivated

    So if you truly want something that is called anytime the app is activated regardless of how, I’d suggest making your own private method, then calling it from both OnLaunched and OnActivated. That should hit all cases for activation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using RegSetKeyValue API in my application. I am referring to http://msdn.microsoft.com/en-us/library/ms724921(VS.85).aspx .
I published a simple ASP.net website referring to this link : http://msdn.microsoft.com/en-us/library/1y1404zt%28v=vs.80%29.aspx I managed
I have been referring to the following page: http://msdn.microsoft.com/en-us/library/ms178129.aspx I simply want to bulk
Refering to this link http://msdn.microsoft.com/en-us/library/b1csw23d.aspx it seems that it is not possible with the
Quote from: http://msdn.microsoft.com/en-us/library/aa645739(VS.71).aspx "Invoking an event can only be done from within the class
I am referring to http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx and http://wp.qmatteoq.com/using-sqlite-in-your-windows-8-metro-style-applications/ As far as I know, sqlite-net doesn't
I am referring this http://www.dotnetcurry.com/ShowArticle.aspx?ID=585 to retrieve image from sql server to window phone
Referring to this web site http://www.cplusplus.com/reference/std/utility/make_pair/ The std::make_pair has this signature (and possible implementation):
I am referring to this project by Jimmy Bogard: http://www.codeplex.com/AutoMapper The code repository site
I was referring to this http://developer.android.com/guide/topics/data/data-storage.html#filesInternal for write file in internal memory. Where do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.