public void Dispose()
 {
     _ComponentsViewModel = null;
     _PropertyEditorManager = null;
     _IsActiveState = false;
     _IsWaitingForUpdateState = false;
     Activated -= App_Activated;
     Deactivated -= App_Deactivated;
     if (_ComponentsViewModel != null)
     {
         _ComponentsViewModel.Dispose();
     }
 }
 public NewPropertyEditor(PropertyEditorManager editorManager, 
     List<UIComponent> data,
     List<Type> availableComponents)
 {
     _IsWaitingForUpdateState = true;
     Activated += App_Activated;
     Deactivated += App_Deactivated;
     _PropertyEditorManager = editorManager;
     _ComponentsViewModel = new EditorWindowViewModel();
     _ComponentsViewModel.AvailableComponents = availableComponents;
     _ComponentsViewModel.PropertyChanged += ViewModelModified;
     InitializeComponent();
     DataContext = _ComponentsViewModel;
 }