public void OnClosed(ViewModelClosedEventArgs e)
 {
     var handler = Closed;
     if (handler != null) handler(this, e);
 }
 private void CloseableViewModelOnClosed(ICloseableViewModel sender, ViewModelClosedEventArgs e)
 {
     _threadManager.Invoke(ExecutionMode.AsynchronousOnUiThread, this, NavigationService, e,
         (provider, service, args) =>
         {
             if (ReferenceEquals(provider._closingViewModel, args.ViewModel))
                 return;
             try
             {
                 provider._closedFromViewModel = true;
                 if (service.TryClose(args.ViewModel, args.Parameter as IDataContext))
                     OnViewModelClosed(args.ViewModel, args.Parameter, provider, true);
             }
             finally
             {
                 provider._closedFromViewModel = false;
             }
         });
 }
 private void CloseableViewModelOnClosed(ICloseableViewModel sender, ViewModelClosedEventArgs e)
 {
     TryCloseViewModel(e.ViewModel, e.Parameter);
 }