Changing active ViewModel performance

Topics: UI Architecture
Mar 19, 2012 at 1:59 PM

I use C.M for application with several DataGrids. Changing between view models with DataGrids on their respective views takes quite a long time. Changing of active VM is done via parent Conductor and a ContentControl bound to ActiveItem property of it.

What is interesting is that as more DataGrids (view models) are opened, the change is even slower.

I have posted the question to StackOverflow since to me it is more about Silverlight than C.M: But still - somebody here could have already solved this issue so I wouldn't have to reinvent the wheel.

The possible solution I can see is to create a custom ContentControl (probably based on ItemsControl) that would besides active item somehow hold the other views so that they are not removed from visual tree and thus not require recreating them again when the respective view is activated.

Any ideas?


Mar 27, 2012 at 1:30 PM

I've created a custom control:

Mar 27, 2012 at 7:46 PM

There were some similar comments at

But thanks for posting the link above. Very useful!