This project is read-only.

Views entries in WM Memory Applet

Dec 10, 2008 at 12:36 PM
Edited Dec 10, 2008 at 12:36 PM
By taking a look at this post i realize that when you navigate through NavigationService, the views are stacking up in the memory applet. (Settings -> Memory) 
Is there a way to avoid this without having to call a modal form? Using Show instead of ShowDialog() and set ownership?


Gonçalo
Dec 10, 2008 at 3:52 PM
The reason why you see the views in the memory applet is because the forms are not hidden, but just overlapped with other forms on the top. An easy fix is to call controller.View.Hide().

-Alex
Dec 10, 2008 at 4:10 PM
Edited Dec 10, 2008 at 4:19 PM
So that fix you suggest should be inside the Navigate method  someting like this:

Controller currentController = history.GetCurrent();
history.Add(controller);
            
controller.View.Show();
if (currentController != null)
currentController.View.Hide();

Which would require the NavigationHistory.GetCurrent() method to verify if there is a Controller in the current field

Gonçalo
Dec 12, 2008 at 8:06 PM
Makes sense.  I will put that in soon.

-Alex
Dec 22, 2008 at 10:00 PM
..or use full screen panels which would increase the performance of screen switching and decreasing the memory usage (forms use more memory than panels)
Dec 23, 2008 at 3:02 PM
BTW, this change should be in the code. I had put this in a few weeks ago.

Thanks... Alex