コード例 #1
0
        private void ContentGrid_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            var pointer = e.GetCurrentPoint(ContentGrid);

            //if (pointer.Properties.IsRightButtonPressed)
            //{
            isDraggingSelection = true;
            pressedPos          = e.GetCurrentPoint((FrameworkElement)sender);
            ContentGrid.CapturePointer(e.Pointer);

            Canvas.SetLeft(SelectionRect, pressedPos.Position.X);
            Canvas.SetTop(SelectionRect, pressedPos.Position.Y);
            //}
        }