Microsoft KB Archive/937133

= Error message when you use code to determine when the Back button is pressed on the Media Center Edition remote control in an XBAP application: &quot;Program Not Responding&quot; =

Article ID: 937133

Article Last Modified on 7/6/2007

-

APPLIES TO


 * Microsoft .NET Framework 3.0

-



SYMPTOMS
Consider the following scenario:
 * You create an XAML browser application (XBAP) for Media Center Edition (MCE).
 * You create the XBAP by using Windows Presentation Foundation (WPF).
 * You want to use the Back button on the MCE remote control to take one of the following actions:
 * To dismiss a popup message
 * To dismiss a menu
 * To change the visual tree of the application in some other way
 * You try to use code to determine when the Back button on the MCE remote control is pressed.

In this scenario, the previous page or the previous XBAP is not loaded. Additionally, you receive the following error message:

Program Not Responding

For example, you may experience these symptoms if the following conditions are true:
 * You use code to capture the BrowserBackKeyDown event in the application to determine when the Back button is pressed.
 * You set the Handled property of the BrowserBackKeyDown event to true.



CAUSE
The MCE host monitors the browser journal. Additionally, it monitors whether the application has stopped responding.

When the Back button on the MCE remote control is pressed, both WPF and the MCE host receive the BrowserBack command. When you set the Handled property of the BrowserBackKeyDown event to true, the MCE host does not handle the event, and the default navigation behavior does not occur. After 15 seconds, the MCE host determines that the browser journal has not moved to the previous page or to the previous application.

When this situation occurs, the MCE host determines that the application has stopped responding. Therefore, the error message is displayed.



RESOLUTION
To resolve this problem, use the NavigationService.AddBackEntry method to add an object that is derived from the CustomContentState class to the browser journal.

Note After the BrowserBack command is detected in the application, and after you use the NavigationService.AddBackEntry method to add an object to the browser journal, the following conditions are true:
 * A valid journal entry exists.
 * The browser journal moves correctly.
 * The MCE host does not detect that the application has stopped responding.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
For more information about how to move back to a previous page or to a previous application in a Media Center XBAP, visit the following Microsoft Web site:

http://wpf.netfx3.com/files/folders/code_snippets/entry5871.aspx

For more information about how to use Windows Presentation Foundation, visit the following Microsoft Web site:

http://wpf.netfx3.com

Keywords: kbtshoot kbexpertiseinter kbexpertisebeginner kberrmsg kbprb KB937133

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.