Esempio n. 1
0
        private void OnMouseUp(object sender, MouseButtonEventArgs e)
        {
            EndAction();

            // Clear selection if this was a non-ctrl click outside of any item (i.e. in the background)
            Point  currentPoint = e.GetPosition(content);
            double width        = currentPoint.X - startPoint.X + 1;
            double height       = currentPoint.Y - startPoint.Y + 1;

            if (Math.Abs(width) <= SystemParameters.MinimumHorizontalDragDistance &&
                Math.Abs(height) <= SystemParameters.MinimumVerticalDragDistance &&
                !SelectionMultiple.IsControlKeyDown)
            {
                treeView.ClearSelection();
            }
        }