Clean viewmodel from memory when their associated pages are removed from backstack

In my WP8.1 universal application there are a few pages say - A, B, C which are associated with their respective ViewModels - VMA, VMB, VMC. When the user reaches page C, I want to remove page B from backstack as well as remove its ViewModel (VMB) from
memory .
The result should b A->C
I am able to remove the page from backstack by setting the navigation state of the frame. How to remove the viewmodel reference to prevent memory leak? The associated viewmodel is subscribed to global events like HardwareButtons.BackPressed, how to
unsubscribe to such events?
I am not using any framework for MVVM.

1. Why should the back button be restricted to app.xaml.cs only? It may be that some functions in the view-model depend on back button. example closing of popup or switching between semantic zooms (jumplist view to full list view). Given that, I have handled
it in App.xaml.cs
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
if (!BackHandled && this.GoBackCommand.CanExecute(null))
e.Handled = true;
this.GoBackCommand.Execute(null);
else
BackHandled = false;
and in my viewmodel I do this:
private void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e)
if (IsCountryListVisible)
App.BackHandled = true;
IsCountryListVisible = false;
e.Handled = true;
return;
2. I took the back button event as an example. My viewmodels may be subscribed to a pubsub/eventbus event which I want to unsubscribe. Another example is disposing or clearing undisposed members/cache.

Similar Messages

  • With no "lock" or "HTTPS" showing up, how do I know in Safari if an online store is actually using a secure link when their web page makes that claim?

    With no "lock" or "HTTPS" showing up, how do I know in Safari if an online store is actually using a secure link when their web page makes that claim?

    The link in your example - https://www.gmx.com/ - is loading non- secure content from http://themes.googleusercontent.com/
    The lock will display only if everything on the page is secure - in this case it's not.
    As Safari has no way of knowing if theme.googleusercontent.com is going to be transmitting or receiving content that should be encrypted, then the overall page is in no way secure, and as such Safari won't display the lock icon.
    This is correct behaviour - it would be dangerous to users to identify pages as secure when they're clearly not.
    Reloading the page above uses cached copies of the fonts, thus no insecure connection is required on the reload. The issue in the link above (GMX) is not a Safari issue, just really bad web development by whomever built the site and mixed secure and insecure content.

  • What do you do when apple support pages are wrong or out of date?

    I'm doing my best to fix my icloud keychain problems using apple's support pages. However, like so many times in the past, these pages are either out of date, just plain wrong or ambiguous.
    So ... after much hair pulling, I've learned from the doc " Get help using iCloud Keychain" that I need to turn off icloud keychain on my three devices. But the instructions fail to say how I'm supposed to do this. Nor does it provide a link to any such instructions.
    Then ... after more hair pulling, I finally found this page "Frequently asked questions about iCloud Keychain” that supposedly explains how to remove iCloud keychain. Not sure if that’s the same thing, but when I try it, I find that the “allow approving security code”  doesn’t exist. Which is surprising since the page was last modified  3/21/15. You’d think they would have caught that.
    The only satisfaction I’ve had during this CF is leaving negative comments on the survey they keep asking me to fill out.
    Please … does an explanation of how to “Turn Off iCloud Keychain” anywhere on the apple support pages? I've got to get some work done today.

    The url is https://support.apple.com/en-us/HT204085
    Just above the last graph is a 1-2-3 list. #2 says: Deselect “Allow approving using security code."
    However, there is no option called this. I have attached a jpg to illustrate.

  • Can you create a playlist when the associated files are not present?

    I want to let my friend create a playlist from songs in MY library, but from HIS computer, so I copied my Library.itl and Library.XML files to his PC to let him peruse what I have. Obviously this only lets hin VIEW the songs, NOT play them. Is there a way he can create a playlist that I can then move back to my library and put on my iPod?
    I've tried dragging and dropping as well as right click>Add to Playlist, but neither method works when the files associated are not present.
    Is it possible?

    No.  iTunes will only add media to a playlist if the media files are present.

  • When browsing, my pages are often redirected at random--sometimes to objectionable sites. How do I stop this?

    This is not a problem that has to do with searches. If I go to one of my regular web pages, say Yahoo!, the site will come up, then disappear when I'm redirected to some other page. The new page is random: sometimes something I've searched or used before, such as Amazon.com, sometimes a random site, such as a dating or school web site, and sometimes porn. It first started with facebook, but has spread to nearly any page I open. Today, I was on a secure web site (my bank) when redirected. Please help!

    Perform a thorough malware scan using several scanners (use only the free scanners, no need to buy one)
    *See --> https://support.mozilla.org/en-US/kb/Is%20my%20Firefox%20problem%20a%20result%20of%20Malware
    *See --> http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Check_for_malware
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *'''''Next Generation Java Plug-in for Mozilla browsers''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Officejet Pro 8500 A910 - when printing 3 pages, skips page 2.

    Hi, I have looked on the online help, the printer itself and the print settings but cannot see how to get the printer to collate the pages correctly when printing double sided. At the moment 4 pages print correctly front and back on 2 pieces of paper, however when only 3 pages are needed it will print on page 1, then 3&4 double sided instead of page 1&2 Double sided and a single side on page 3. 
    Any help would be appreciated. We are an office of 5 people working on Mac OSX 10.7.5. Printer is: 
    Officejet Pro 8500 A910

    Hey there Trubbs,
    I have a few more steps in mind. Here they are in order I suggest them!
    Mac OS X: How to reset the printing system
    Repair disk permissions
    Restart your Mac
    Re-add the printer and test again
    Hope that does the trick
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Just upgraded my system to snow leopard...now when I open documents from my memory stick, its in 'pages' not word...how do I fix that??

    Just upgraded my system to snow leopard...now when I open documents from my memory stick, its in 'pages' not word...how do I fix that??

    Did you click on the little triangle? Did you select one of the document files before pressing COMMAND-I to open the Get Info window? If the panel is closed it looks like this:
    If you then click on that little triangle gadget you get this:
    A temporary solution is to CTRL- or RIGHT-click on the document file, navigate to the Open With item, and select from the sub-menu.
    The first method makes the association permanent. This method only applies to the currently selected document.

  • How to automatically remove the wiki page's images from the Images library , when a wiki page is deleted

    I have noted the following strange behavior inside my Publishing enterprise wiki site collection. Now by default when I create a new wiki page and I add Pictures to it, the pictures will be saved under the “Images” library and will be inside a unique folder
    that have its name similar to the page name.
    But when users delete the picture from the wiki page or they delete the whole wiki page, then the related folder inside the “Images” library will not be removed. So can anyone advice if there is a way to automatically remove the page’s pictures
    folder from the Images library when the page is deleted? as currently i might end up having many pictures inside the Images library which are not linked to a wiki page, and they will waste my server desk space...

    I think, not sure, there's no out-of-the-box solution in SharePoint for this problem. So I can only think of custom solution:
    In event Receiver, ItemDeleting, you can delete images. The only downside is if some other pages are referring the images..... you need to check somehow which is quite time-consuming operations if you have thousand of pages in wiki library
    A timer job, that will run periodically, every day or week, and clean all unused images. 
    Hide the default delete button and add your own. And then using your own custom layout page, show a 'configuration dialog' to user if they want to delete both page and images.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com
    Please do not tell me this is not supported out of the ox ,,,,, i that i should handle this process by myself !!! and SharePoint does not support this feature .... this is another  problem i should include in my list .....

  • Out of Memory when opening page setup

    I am getting an "Out of Memory" error when opening the page setup window.  I am unable to continue as Crystal is locked up.  Has any one seen this behavior before?  I am running Crystal Reports 2008 Service Pack 0 Version: 12.0.0.683.  This is running in a terminal server environment.

    Hi Bruce,
    Please uninstall CRXI from the machine by following the Note as per below:
    Before getting started, uninstall Crystal Reports XI by launching the Setup.exe file from the installation CD or by using the 'Add/Remove Programs' command. If either of these methods fails to remove all Crystal Reports directories, files and registry keys, then continue with the resolution of this article.
    ==========
    WARNING:
    This resolution can be applied if Crystal Reports XI is the only software installed on the computer that uses the Business Objects directories, files and registry keys.
    For example, Crystal Analysis, Crystal Enterprise and BusinessObjects Enterprise XI are applications that may share the same directories, files and registry keys.
    Removing these directories, files and registry keys may cause other software to function incorrectly.
    ==========
    1. To manually uninstall Crystal Reports XI, delete the following directories:
    u2022 C:\Program Files\Common Files\Business Objects\3.0
    u2022 C:\Program Files\Business Objects
    ====================
    NOTE:
    Do not remove the directory C:\Program Files\Common Files\Business Objects\3.0 if you have BusinessObjects Enterprise XI or Crystal Reports Server XI installed. These files are shared by both applications and removal of these files will cause Business ObjectsEnterprise XI and Crystal Reports Server XI to function incorrectly.
    ====================
    2. Delete the following registry keys:
    ====================
    WARNING:
    The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall the Microsoft Windows operating system. Use the Registry Editor at your own risk.
    HELP:
    For information on how to edit the registry key, view the 'Changing Keys And Values' online Help topic in the Registry Editor (Regedit.exe).
    RECOMMENDATION:
    It is strongly recommended that you make a backup copy of the registry files (System.dat and User.dat on Win9x computers) before you edit the registry.
    ====================
    u2022 HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\
    u2022 HKEY_CURRENT_USER\Software\Business Objects\Suite 11.0\Crystal Reports
    u2022 HKEY_USERS\S-#-#-##-...-####\Software\Business Objects\Suite 11.0\Crystal Reports
    (The number signs (#) represent a series of numbers that are different on each computer.)
    ====================
    NOTE:
    After making changes to the registry, restart the affected service or application as required.
    ====================
    For CR2008 please install SP0 from
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm]
    I hope this helps.
    Shraddha

  • Firefox not displaying buttons and boxes when allow other pages to use their fonts instead of my selection is selected

    Firefox not displaying buttons and boxes when allow other pages to use their fonts instead of my selection is not selected. The irritating thing is that Firefox used to display pages until FF 31. Please fix this
    Thanks
    Randy

    The missing icons are supplied by a font that is downloaded from the server (@font-face) as you can probably see by little boxes that show the hex code of the characters.
    You will have to make sure that you allow pages to choose their own fonts to see such an icon font.
    *Tools > Options > Content : Fonts & Colors > Advanced: [X] "Allow pages to choose their own fonts, instead of my selections above"

  • When I open Pages from the dock, the page comes up but immediately hangs up with the

    When I open Pages from the Dock,  the page comes up on the screen but immediately hangs up with the rainbow circle spinning.  I finally have to force quite to make it go away.  It does not ask me to choose a template.  This is sporadic, sometimes working, sometimes not.  What is going on?

    Helo,
    Did you try to delete Pages' preferences file(s) in the folder your-user-name/Library/Preferences ?
    There are one or more (depends on your OS X version) file like "com.apple.iWork.Pages.plist"
    You can also repair permissions with Disk Utility in the folder Applications/Utilities.
    Choose the hard drive were Pages is and click the button "Repair permissions".
    Or you can re-install Pages.
    Hope this will help.

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

  • Firefox becomes really slow then eventually unresponsive when loading a page with many hires images. Unsual high memory usage up to 2gigs just for firefox. Was never a problem with v3.6.

    When loading a page with many hires images, Firefox becomes really slow and scrolling becomes jumpy then eventually becomes completely unresponsive. Unusual high memory usage of up to 2gigs just for firefox when loading these pages. This was never a problem with v3.6.

    I encountered the same type of problem. Firefox running terribly slowly and slowing down my entire machine (Core i5 with 256GB SSD). Searching the forums, I found a couple of things about troubleshooting performance issues, one of which was to use '''hardware acceleration''', that is on by default. It was turned on on my PC, '''so I tried deactivating it, and it worked!'''
    So doing the exact opposite as Mozilla support said solved the problem. It is really a pain now to work with Firefox. I'm using it because I have no choice, but I'd recommend IE and Chrome over Firefox... Whatever, the market will decide once Firefox has become to crappy...

  • A fix for the Mozilla Firefox SSL Certificate Validation Security Weakness vulnerability? This appears to be an issue with not revalidating certificates when loading HTTPS pages from cache.

    We have to close vulnerabilities for PCI & Cybertrust certification. We have upgraded users running Firefox to version 7.0.1 but we are still receiving the message: Mozilla Firefox SSL Certificate Validation Security Weakness. Researching the issue, it appears to be related to certificates not being revalidated when loading HTTPS pages from cache. The bug report I found is:
    Bug 660749 - Firefox doesn't (re)validate certificates when loading a HTTPS page from the cache

    cookies.squite answer is Today at 5:15 PM .
    New profile, same problem.
    We've already established it is not a add-ons problem but obviously there will be less add-ons in this new profile to help exclude.
    Since there is two PC profiles on the PC, I tried the second profile, same problem. Used the RESET FF function on the second PC profile...same thing...even followed the instruct for uninstall &re-install...same problem.
    (3) different virus scanners, no hard core problems.
    Suspect how I have something in Windows setup that no one else is using?

  • When I try to open a Pages document from iCloud, created on my iPad, I get message stating I need a newer version of Pages.  When I go to app store all I get is "installed" when looking at pages app. my Macbook pro is up to date with all updates.

    When I try to open a Pages document from iCloud, created on my iPad, I get message stating I need a newer version of Pages.  When I go to app store all I get is "installed" when looking at pages app. my Macbook pro is up to date with all updates. Any ideas?

    You have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5/5.01 can not open Pages 5.1 files and you will get the warning that you need a newer version.
    Pages 5.1 sometimes can not open its own files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has not only managed to confuse all its users, but also itself.
    Note: Apple has removed over 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

Maybe you are looking for

  • How can I copy extensions from one computer to another?

    I use about a dozen extensions on one computer, and would like to use the same ones with the same settings on another computer. Copying the cryptically-named folders from the ...Profiles/xxxx.default/extensions folder doesn't work - FF doesn't seem t

  • Print to network printer on Headless Unix box

    Hi I have written an app which prints an image on the default printer of a headless unix box. I have been told that if I which to extend my app to print my document to a named network printer, I will need to get additional software. Is this true?

  • Problem in OAC0 ( create content repositories)

    Hi Friends, I am trying to execute a senario of linking DMS with OPEN TEXT (Content Management) We have completely installed "Open Text Archiving and Document Access for SAP Solutions" in SAP. I am encountering with a problem, when I'm trying to crea

  • WSIF EJB Invocation exception

    using: 10.1.2, WebLogic 8.1sp4, Solaris 9 I am trying to invoke an ejb directly via the WSIF. I can get the sample working but when I try to get my real stuff working I get the following exception: [having the default.collaxa.cube.ws logging set to D

  • Vertical format

    I have a hard copy book in a vertical format- Why will ibooks not let me design in the same format, am I missing something? Thank you Paul