public override void Detach()
        {
            base.Detach();

            // if we added something before
            if (textView != null)
            {
                // remove and dispose everything we added
                if (colorizer != null)
                {
                    textView.LineTransformers.Remove(colorizer);
                    colorizer.Dispose();
                }
                if (contentHost != null)
                {
                    textView.Services.RemoveService(typeof(IOutlineContentHost));
                    contentHost.Dispose();
                }
                textView.Services.RemoveService(typeof(XamlLanguageBinding));
            }
        }
Example #2
0
        public override void Detach()
        {
            base.Detach();

            // if we added something before
            if (textView != null)
            {
                // remove and dispose everything we added
//				if (colorizer != null) {
//					textView.LineTransformers.Remove(colorizer);
//					colorizer.Dispose();
//				}
                if (contentHost != null)
                {
                    textView.Services.RemoveService(typeof(IOutlineContentHost));
                    contentHost.Dispose();
                }
                textView.Services.RemoveService(typeof(XamlTextEditorExtension));
            }

            SD.ParserService.ParseInformationUpdated -= ParseInformationUpdated;
        }