Esempio n. 1
0
        public InkLassoSelectionService(
            InkCanvas inkCanvas,
            Canvas selectionCanvas,
            InkStrokesService strokeService,
            InkSelectionRectangleService selectionRectangleService)
        {
            _inkPresenter = inkCanvas.InkPresenter;
            _selectionCanvas = selectionCanvas;
            _strokeService = strokeService;
            _selectionRectangleService = selectionRectangleService;

            _inkPresenter.StrokeInput.StrokeStarted += StrokeInput_StrokeStarted;
            _inkPresenter.StrokesErased += InkPresenter_StrokesErased;
        }
Esempio n. 2
0
        public InkNodeSelectionService(
            InkCanvas inkCanvas,
            Canvas selectionCanvas,
            InkAsyncAnalyzer analyzer,
            InkStrokesService strokeService,
            InkSelectionRectangleService selectionRectangleService)
        {
            _inkCanvas                 = inkCanvas;
            _selectionCanvas           = selectionCanvas;
            _inkPresenter              = _inkCanvas.InkPresenter;
            _analyzer                  = analyzer;
            _strokeService             = strokeService;
            _selectionRectangleService = selectionRectangleService;

            _inkCanvas.Tapped           += InkCanvas_Tapped;
            _inkCanvas.DoubleTapped     += InkCanvas_DoubleTapped;
            _inkCanvas.PointerPressed   += InkCanvas_PointerPressed;
            _inkPresenter.StrokesErased += InkPresenter_StrokesErased;
        }