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 6847295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:43:39+00:00 2026-05-27T00:43:39+00:00

A WP 7.1 project starts with a Page that host a Panorama control. At

  • 0

A WP 7.1 project starts with a Page that host a Panorama control. At some point user click on a ListBox, and this navigates the application to a details page.

In case the debugger is attached, everything stays on the screen as it should. But If I test an application either in emulator, or on the phone without a debugger, approximately in 5-10 seconds after the details page navigation, an application gets deactivated.

No unhanded exception, not closing, but deactivated even is raised. I have placed a message boxes in each of “exit handlers” to know exactly what happens and found out that it is deactivation.

No user input takes place after navigation and before the deactivation.

What may be the reason for such “no interaction” deactivation?

I don’t call no “deactivate” requests from code.

Additional info:
Details page is bound to a sample view model that is obtained via MVVM Light ViewModel locator. View model locator gets it from ninject kernel that is a static public property of an App object(Yes, I have made IOC container publicly available via App property. I know it probably is a horrible practice, but I doubt the problem is linked to that). The page initializes just fine and displays all the data from a sample view model class. It almost seems like an app is deactivated due to inactivity, but there is no such thing in WP7 as far as I know.

UPDATE

A deactivation takes place exactly 10 seconds afer I call this line:

((PhoneApplicationFrame)(Application.Current.RootVisual)).Navigate(new Uri("/Views/BookDetailsView.xaml", UriKind.Relative));

from a view model of a main application view. The problem view is a details view, not the main one.

The constructor for BookDetailsView is empty (default):

public partial class BookDetailsView : UserControl
    {
        public BookDetailsView()
        {
            InitializeComponent();
        }
    }

The XAML for the view binds it’s datacontext to a property of a mvvm light view model locator:

DataContext="{Binding Source={StaticResource Locator}, Path=BookDetails}"

The Locator resource is decleared in App.xaml and points to ViewModelLocator.cs.

The property that provides datacontext for a problem view is:

public static IBookDetailsViewModel BookDetailsStatic
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the Main property.
        /// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance",
            "CA1822:MarkMembersAsStatic",
            Justification = "This non-static member is needed for data binding purposes.")]
        public IBookDetailsViewModel BookDetails
        {
            get
            {
                return BookDetailsStatic;
            }
        }

The BookDetailsStatic is initialized from the IoC container call in the ViewModelLocator ctor:

BookDetailsStatic = App.Kernel.Get<IBookDetailsViewModel>();

In a any scenario the call to get an IBookDetailsViewModel returns an instance of a

public class SampleBookDetailsViewModel: IBookDetailsViewModel

which has an empty constructor and a bunch of properties.

SOLVED
My view, that I have been navigating to, was declared as a UserControl, and should have been as PhoneApplicationPage.

  • 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-05-27T00:43:40+00:00Added an answer on May 27, 2026 at 12:43 am

    BookDetailsView was decleared as a UserControl.

    Navigating to a UserControl deactivates an application in 10 seconds.

    Changing the type of a view to PhoneApplicationPage solves the problem.

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

Sidebar

Related Questions

I have an ASP.NET Web Application project that I am using to host a
within my current project file I have a user control that has a storyboard
This is probably a basic question. I have two projects: A web application project,
I have some method that is invoked on Application_Start. And it starts on first
I'm building a web page screen capture application for an internal R&D project. Environment:
My current project is a form that receives input from a user. After I
I'm about to start an iOS project that requires pulling user's data from an
I have an ASP.NET project. Currently, it starts on the Default.aspx page. However, I’d
I'm working on an integration testing project in .NET. The testing framework executable starts
I'm about to start a project that will record and edit audio files, and

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.