[Caliburn Micro] How to remove the attached view from it's ViewModel

Topics: Framework Services
Nov 3, 2011 at 8:03 AM

Hi..,

I would like to know how to remove the attached view from it's Viewmodel. ViewModel class is exported with Shared mode.

    [Export]
    [PartCreationPolicy(CreationPolicy.Shared)]
    public class SampleViewModel : Screen

   {

   }

in this SampleView will be attached when ever we use this SampleViewModel instance. Once after that I want to detach the view on certain scenarios. Can anyone suggest how to achieve that?

Regards,

- Jey -