c# - How to override back button for a page outside of it? -


I know how to override the back button inside a page:

  Secure Override Zero OnBackKeyPress (System.ComponentModel.CancelEventArgs E) {// Base your work here OnBackKeyPress (E); }  

But problem: I use the interactive advertising service when I enter InneractiveAd.DisplayAd () Then it shows a new page of itself that does not support the back button when it navigates on this page, its Yuri is like this:

  / inactive .ad. Component / Inactive Fullscipe Xml  

Question: Is it possible to override the back button on the page when the user is pressed back?

In HandleBackKeyPress, you usually block the BackKeyPress event, so you can switch back to the standard < / Em> can be set to e.Cancel = true . In order to emulate standard navigation, you do something like this:

  Zero HookupCappress (Phone app page page) {page.BackKeyPress + = HandleBackKeyPress; } Zero Handbill Keypress (Object Sender, RevokeAventErg E) {page.NavigationService.GoBack (); }  

The problem is to get the context of the navigated page The following code will work only after navigating completely on the new page and when it immediately navigation service Navigate (..)

  var frame = (PhoneApplicationFrame) Application.Current.RootVisual; Page = (Phone app) frame material;  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -