Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
Help with Multiple XamGrids on Multiple TabItems
posted

Hi.

We have an application that uses a TabControl with multiple TabItems.  Each TabItem contains 1 (and sometimes 2) XamGrids.  These XamGrids make extensive use of Templated columns, with styles and converters.

What we have noticed is that when switching between tabs, the memory being used on the one tab is not released when moving to the next tab.  Therefore the application continues to use more and more memory as the application is used. 

I have managed this to some extent by, when the user selects a different tab, setting the grid's ItemesSource = Nothing, looping though the cells collection and setting the cell.Content = Nothing, and finally looping through the rows collection and DISPOSing of all rows.  But even all of this doesn't fully release the memory.

What I can not do (at least I haven't figured out how) is dispose of the grids themselves because the user may come back to a previous tab and the grid needs to exist.  I also cannot clear the page's resources collection because these resources are needed on the other tabs.

So my question is, is there something more I can do to manage the memory in this scenario?

We are using XamGrid version  10.3.20103.2279.

Thanks,

John