コード例 #1
0
        public InkLassoSelectionService(InkCanvas _inkCanvas, Canvas _selectionCanvas, InkStrokesService _strokeService, InkSelectionRectangleService _selectionRectangleService)
        {
            // Initialize properties
            inkPresenter              = _inkCanvas.InkPresenter;
            selectionCanvas           = _selectionCanvas;
            strokeService             = _strokeService;
            selectionRectangleService = _selectionRectangleService;

            // lasso selection
            inkPresenter.StrokeInput.StrokeStarted += StrokeInput_StrokeStarted;
            inkPresenter.StrokesErased             += InkPresenter_StrokesErased;
        }
コード例 #2
0
        public InkNodeSelectionService(
            InkCanvas _inkCanvas,
            Canvas _selectionCanvas,
            InkAsyncAnalyzer _analyzer,
            InkStrokesService _strokeService,
            InkSelectionRectangleService _selectionRectangleService)
        {
            // Initialize properties
            inkCanvas                 = _inkCanvas;
            selectionCanvas           = _selectionCanvas;
            inkPresenter              = inkCanvas.InkPresenter;
            analyzer                  = _analyzer;
            strokeService             = _strokeService;
            selectionRectangleService = _selectionRectangleService;

            // selection on tap
            inkCanvas.Tapped       += InkCanvas_Tapped;
            inkCanvas.DoubleTapped += InkCanvas_DoubleTapped;

            //drag and drop
            inkCanvas.PointerPressed += InkCanvas_PointerPressed;

            inkPresenter.StrokesErased += InkPresenter_StrokesErased;
        }