TCoder
TCoder

Reputation: 295

WPF TabControl Memory Issues

If I have 1 tabcontrol and 2 tabitems each containing a datagrid and load them on startup of the application the memory level is normal.

If I have 2 tab controls and each tabcontrol has 1 tabitem and i load them on startup of application memory goes crazy.

What am I doing wrong?

I am loading them the exact same way in both cases the 1 of the datagrid are using in a different control.

Upvotes: 1

Views: 325

Answers (1)

Ed Ayers
Ed Ayers

Reputation: 1354

I could be wrong but I'm guessing that it's because that if you have one tab control with 2 tabs WPF only has to draw one of the datagrids at a time but if 2 tab controls are present WPF is drawing both of the data grids at the same time so it is going to use up more memory.

Not sure though!

Upvotes: 1

Related Questions