-
Dec 30th, 2011, 10:14 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] WP7 - OnBackKeyPress Dispose()?
I'm trying to cleanup unused items but so far no luck...it's quite annoying some forms not to be closed when the back button is pressed. The test application acts just like a browser.
used code
Code:
Private Sub PanoramaPage1_BackKeyPress(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles MyBase.BackKeyPress
MyBase.Finalize()
End Sub
for some forms i just need them to be closed/disposed and not be kept in the navigation history.
Any ideas?
-
Dec 31st, 2011, 02:40 AM
#2
Frenzied Member
Re: WP7 - OnBackKeyPress Dispose()?
Forms should be closed automatically when the back button is pressed - and objects disposed of.
Are you talking about forms here, or panorama pages?
the OnNavigatedFrom event is fired when you press a back button - any clean up would be done there
-
Dec 31st, 2011, 11:40 AM
#3
Thread Starter
Fanatic Member
Re: WP7 - OnBackKeyPress Dispose()?
hmm yeah it's a panorama page.
Thing is, when i press the back button the panorama page doesn't seem to be disposed because if i press more then once, the program will re open all pages that i opened before
-
Dec 31st, 2011, 12:24 PM
#4
Frenzied Member
Re: WP7 - OnBackKeyPress Dispose()?
Hi,
if it is opening pages you navigated through to get to the panorama page - that is correct. The back key should always take you to the screen you came from, and the back key on the main page should exit the application.
That is how it is designed to work
-
Jan 6th, 2012, 08:25 AM
#5
Thread Starter
Fanatic Member
Re: WP7 - OnBackKeyPress Dispose()?
My error, i wasn't using NavigationService.GoBack(), instead, i was using NavigationService.Navigate() to go back to the main xaml. Yeah you were right, the back command actually closes the pages.
-
Jan 6th, 2012, 08:27 AM
#6
Thread Starter
Fanatic Member
Re: [RESOLVED] WP7 - OnBackKeyPress Dispose()?
btw, i can't rate your post, the link is crying about "You must spread some Reputation around before giving it to petevick again."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|