Deactivating child viewmodels

Oct 9, 2012 at 7:40 AM

Hello,

I've got a viewmodel that has inside 2 child viewmodel, one for a timebar and one for a grid...

I pass an interface with the items to the two viewmodels and the first time everything works fine...when the user close then reopen the main viewmodel in the children  viewmodel the data are appended instead of reloaded... I use this for importing the viewmodels

   [Import]
        public TimelineUserControlViewModel TimeControl { get; set; }

      
        [Import(RequiredCreationPolicy= CreationPolicy.NonShared)]
        public GridI1UserControlViewModel GrigliaIndicatori { get; set; }

The OnDeactivate in the two viewmodels is never called... my main viewmodel is a Screen, how do I force the two children to deactivate  and clear the contained data?

Thanks