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

  • SEARCH
  • Home
  • 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 8271789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:56:05+00:00 2026-06-08T06:56:05+00:00

I’m having issues with my Windows Store App launch. When I use the close

  • 0

I’m having issues with my Windows Store App launch. When I use the “close app gesture” (slide the app from top to bottom) and then launch the app again very fast, sometimes a blank black screen appears and when I click on it, it, the Start menu appears, and a “MoAppHang” event is logged.

My App_Launched event code is here:

       protected override async void OnLaunched(LaunchActivatedEventArgs args)
    {
        if (args.PreviousExecutionState == ApplicationExecutionState.Terminated )
        {
            // Restore the saved session state only when appropriate
            await SuspensionManager.RestoreAsync();                
        }


        // Do not repeat app initialization when already running, just ensure that
        // the window is active
        if (args.PreviousExecutionState == ApplicationExecutionState.Running)
        {
            if (!string.IsNullOrEmpty(args.Arguments))
            {
                Frame f = Window.Current.Content as Frame;
                if (f != null)
                {
                    UseSecondaryTileNavigation(f, args.Arguments);
                }
            }
            Window.Current.Activate();
            return;
        }

        Frame rootFrame;
        if (Window.Current.Content == null)
        {

            // Create a Frame to act as the navigation context and associate it with
            // a SuspensionManager key
            rootFrame = new Frame();
            SuspensionManager.RegisterFrame(rootFrame, "AppFrame");
        }
        else
        {
            rootFrame = (Frame)Window.Current.Content;
        }

        if (!await DatabaseHelper.ExistsDatabase())
        {
            await DatabaseHelper.CreateDatabase();
        }

        if (rootFrame.Content == null)
        {
            // When the navigation stack isn't restored navigate to the first page,
            // configuring the new page by passing required information as a navigation
            // parameter
            if (!rootFrame.Navigate(typeof(ItemsPage), "AllGroups"))
            {
                throw new Exception("Failed to create initial page");
            }
        }

        if (!string.IsNullOrEmpty(args.Arguments))
        {
            UseSecondaryTileNavigation(rootFrame, args.Arguments);
        }

        // Place the frame in the current Window and ensure that it is active
        if (Window.Current.Content == null)
        {
            Window.Current.Content = rootFrame;
        }
        Window.Current.Activate();

The UseSecondaryTileNavigation performs navigation when user opens the app using secondary tile (it basically uses the Frame parameter and Navigates it to the correct location using Frame.Navigate).

Where am I going wrong?

Thank you all!

  • 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-08T06:56:06+00:00Added an answer on June 8, 2026 at 6:56 am

    It looks like you could potentially be doing a bit of time-consuming work in your launch handler. The first suggestion I’d make is to use a custom splash screen technique. That is, in your OnLaunched handler try to set the Window.Current.Content and activate the window and get out of that method ASAP. You could set Window.Current.Content to a page that just shows a loading progress bar – and handle your actual loading logic in there.

    The next thing to look at – is what happens when your app is launched while it is still suspending? (Do you have a suspending handler?) Can your app handle the case when it is (re-)launched before a previous suspension / close completes?

    I’ve noticed that it generally seems to take a few seconds before the app is fully closed (even though you close it using the drag down gesture).

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.