Ejemplo n.º 1
0
        public void Dispose()
        {
            _textView.GotAggregateFocus         -= OnTextViewGotAggregateFocus;
            _textView.LostAggregateFocus        -= OnTextViewLostAggregateFocus;
            _textView.VisualElement.SizeChanged -= OnElementSizeChanged;
            this.SizeChanged -= OnElementSizeChanged;

            if (_findAdornmentLayer != null)
            {
                ((UIElement)_findAdornmentLayer).LayoutUpdated -= FindAdornmentCanvas_LayoutUpdated;
            }

            _model.Dispose();
            PresentationSource.RemoveSourceChangedHandler(this, OnPresentationSourceChanged);
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            _textView.GotAggregateFocus         -= OnTextViewGotAggregateFocus;
            _textView.LostAggregateFocus        -= OnTextViewLostAggregateFocus;
            _textView.VisualElement.SizeChanged -= OnElementSizeChanged;
            this.SizeChanged -= OnElementSizeChanged;

            if (_findAdornmentLayer != null)
            {
                ((UIElement)_findAdornmentLayer).LayoutUpdated -= FindAdornmentCanvas_LayoutUpdated;
            }

            if (_textFormattingMap != null)
            {
                _textFormattingMap.FormatMappingChanged -= UpdateBorderColors;
            }

            this.Loaded -= Dashboard_Loaded;

            _model.Dispose();
            PresentationSource.RemoveSourceChangedHandler(this, OnPresentationSourceChanged);
        }