public override void Dispose() { base.Dispose(); RelatedNodeListBoxViewModel.ItemSelected -= OnRelatedNodeSelected; RelatedNodeListBoxViewModel.Items.CollectionChanged -= OnRelatedNodeCollectionChanged; RelatedNodeListBoxViewModel.Dispose(); DiagramEventSource.DiagramChanged -= OnDiagramChanged; UnsubscribeFromViewportEvents(); DiagramViewportViewModel.Dispose(); }