src/Misc/EFTools/XmlCore/UI/Views/Explorer/ExplorerFrame.cs
/// <summary>
///     Handler for the event when the mouse is hovered on top of this element.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
Handler for the event when the mouse is hovered on top of this element.
Handler for the event when the mouse is hovered on top of this element .
private void OnTreeViewPreviewMouseMove(object sender, MouseEventArgs e)
        {
            Debug.Assert(ExplorerTreeView != null, "Why ExplorerTreeView is null");
            if (ExplorerTreeView != null
                && _isTreeViewMouseDown
                && !_isDragDrop
                && !ExplorerTreeView.IsMouseCaptured)
            {
                try
                {
                    ExplorerTreeView.CaptureMouse();
                    if (_selectedExplorerEFElement != null
                        && _selectedExplorerEFElement.ModelItem != null)
                    {
                        var dataObject = GetClipboardObjectForExplorerItem(_selectedExplorerEFElement);
                        if (dataObject != null)
                        {
                            _isDragDrop = true;
                            DragDrop.DoDragDrop(ExplorerTreeView, dataObject, DragDropEffects.All);
                        }
                    }
                }
                finally
                {
                    _isDragDrop = false;
                    _isTreeViewMouseDown = false;
                    ExplorerTreeView.ReleaseMouseCapture();
                }
            }
        }
private void OnTreeViewPreviewMouseMove ( object sender , MouseEventArgs e ) { Debug . Assert ( ExplorerTreeView != null , " " ) ; if ( ExplorerTreeView != null && _isTreeViewMouseDown && ! _isDragDrop && ! ExplorerTreeView . IsMouseCaptured ) { try { ExplorerTreeView . CaptureMouse ( ) ; if ( _selectedExplorerEFElement != null && _selectedExplorerEFElement . ModelItem != null ) { var dataObject = GetClipboardObjectForExplorerItem ( _selectedExplorerEFElement ) ; if ( dataObject != null ) { _isDragDrop = true ; DragDrop . DoDragDrop ( ExplorerTreeView , dataObject , DragDropEffects . All ) ; } } } finally { _isDragDrop = false ; _isTreeViewMouseDown = false ; ExplorerTreeView . ReleaseMouseCapture ( ) ; } } }
Handler for the event when the mouse is hovered on top of this element.
Handler for the event when the mouse is hovered on top of this element .
// capture the mouse event so no other elements got event notification until we release it.
sender
object
None
e
MouseEventArgs
None