private void OnLostFocus(object sender, RoutedEventArgs args)
        {
            MyParent.PreviewMouseLeftButtonDown -= OnPreviewParentMouseDown;
            PreviewKeyDown          -= OnPreviewKeyDown;
            adorner.ResizeStarted   -= OnResizeStarted;
            adorner.ResizeCompleted -= OnResizeCompleted;

            var adornerLayer = AdornerLayer.GetAdornerLayer(MyContent);

            adornerLayer.Remove(adorner);
            adorner = null;
        }
        private void OnGotFocus(object sender, RoutedEventArgs args)
        {
            MyParent.PreviewMouseLeftButtonDown += OnPreviewParentMouseDown;
            PreviewKeyDown          += OnPreviewKeyDown;
            adorner                  = new ResizingAdorner(MyContent);
            adorner.ResizeStarted   += OnResizeStarted;
            adorner.ResizeCompleted += OnResizeCompleted;

            var adornerLayer = AdornerLayer.GetAdornerLayer(MyContent);

            adornerLayer.Add(adorner);
        }
        private void OnLostFocus(object sender, RoutedEventArgs args)
        {
            MyParent.PreviewMouseLeftButtonDown -= OnPreviewParentMouseDown;
            PreviewKeyDown -= OnPreviewKeyDown;
            _adorner.ResizeStarted -= OnResizeStarted;
            _adorner.ResizeCompleted -= OnResizeCompleted;

            var adornerLayer = AdornerLayer.GetAdornerLayer(MyContent);
            adornerLayer.Remove(_adorner);
            _adorner = null;
        }
        private void OnGotFocus(object sender, RoutedEventArgs args)
        {
            MyParent.PreviewMouseLeftButtonDown += OnPreviewParentMouseDown;
            PreviewKeyDown += OnPreviewKeyDown;
            _adorner = new ResizingAdorner(MyContent);
            _adorner.ResizeStarted += OnResizeStarted;
            _adorner.ResizeCompleted += OnResizeCompleted;

            var adornerLayer = AdornerLayer.GetAdornerLayer(MyContent);
            adornerLayer.Add(_adorner);
        }