public override void Dispose() { if (!disposed) { disposed = true; WorkbenchSingleton.Workbench.ActiveViewContentChanged -= ActiveViewContentChanged; Properties properties = xPathQueryControl.CreateMemento(); PropertyService.Set(XPathQueryControlProperties, properties); xPathQueryControl.Dispose(); } }