84 references to InkCanvas
PresentationFramework (84)
MS\Internal\Ink\EditBehavior.cs (2)
206Transform layoutTransform = this.InkCanvas.LayoutTransform; 207Transform renderTransform = this.InkCanvas.RenderTransform;
MS\Internal\Ink\EraserBehavior.cs (15)
170&& ( _cachedStylusShape.Width != InkCanvas.EraserShape.Width 171|| _cachedStylusShape.Height != InkCanvas.EraserShape.Height 172|| _cachedStylusShape.Rotation != InkCanvas.EraserShape.Rotation 173|| _cachedStylusShape.GetType() != InkCanvas.EraserShape.GetType()) ) 199this.InkCanvas.Strokes.GetIncrementalStrokeHitTester(this.InkCanvas.EraserShape); 277_cachedStylusShape = InkCanvas.EraserShape; 296DpiScale dpi = this.InkCanvas.GetDpi(); 353this.InkCanvas.RaiseStrokeErasing(args); 358InkCanvas.Strokes.Remove(e.HitStroke); 359this.InkCanvas.RaiseInkErased(); 391this.InkCanvas.RaiseStrokeErasing(args); 407this.InkCanvas.Strokes.Replace(strokesToReplace, eraseResult); 411this.InkCanvas.Strokes.Remove(strokesToReplace); 429this.InkCanvas.RaiseInkErased();
MS\Internal\Ink\InkCollectionBehavior.cs (17)
114InkCanvas.RaiseActiveEditingModeChanged(new RoutedEventArgs(InkCanvas.ActiveEditingModeChangedEvent, InkCanvas)); 177if (InkCanvas.InternalDynamicRenderer != null) 179InkCanvas.InternalDynamicRenderer.Enabled = true; 180InkCanvas.UpdateDynamicRenderer(); // Kick DynamicRenderer to be hooked up to renderer. 196if (InkCanvas.InternalDynamicRenderer != null) 198InkCanvas.InternalDynamicRenderer.Enabled = false; 199InkCanvas.UpdateDynamicRenderer(); // Kick DynamicRenderer to be removed from renderer. 238_strokeDrawingAttributes = this.InkCanvas.DefaultDrawingAttributes.Clone(); 244if ( InkCanvas.InternalDynamicRenderer != null && inputDevice != null ) 248InkCanvas.InternalDynamicRenderer.Reset(stylusDevice, stylusPoints); 300InkCanvas.RaiseGestureOrStrokeCollected(argsStroke, _userInitiated); 338if ( _cachedPenCursor == null || _cursorDrawingAttributes != InkCanvas.DefaultDrawingAttributes ) 343DrawingAttributes da = this.InkCanvas.DefaultDrawingAttributes; 357_cursorDrawingAttributes = InkCanvas.DefaultDrawingAttributes.Clone(); 358DpiScale dpi = this.InkCanvas.GetDpi(); 359_cachedPenCursor = PenCursorManager.GetPenCursor(da, false, (this.InkCanvas.FlowDirection == FlowDirection.RightToLeft), dpi.DpiScaleX, dpi.DpiScaleY);
MS\Internal\Ink\LassoSelectionBehavior.cs (14)
247selectedStrokes = InkCanvas.EndDynamicSelection(_lassoHelper.Visual); 288InkCanvas.ChangeInkCanvasSelection(selectedStrokes, elementsToSelect.ToArray()); 329this.InkCanvas.UpdateDynamicSelection(e.SelectedStrokes, e.DeselectedStrokes); 340if ( this.InkCanvas.Children.Count == 0 ) 345for (int x = 0; x < this.InkCanvas.Children.Count; x++) 347UIElement uiElement = this.InkCanvas.Children[x]; 348HitTestElement(InkCanvas.InnerCanvas, uiElement, elementsToSelect); 588if ( InkCanvas.ClearSelectionRaiseSelectionChanging() // If user cancels clearing the selection, we shouldn't initiate Lasso. 599this.InkCanvas.Strokes.GetIncrementalLassoHitTester(_percentIntersectForInk); 610InkCanvas.BeginDynamicSelection(_lassoHelper.Visual); 636StrokeCollection hitTestStrokes = InkCanvas.Strokes.HitTest(point, 5.0d); 643GeneralTransform transformToInnerCanvas = InkCanvas.TransformToVisual(InkCanvas.InnerCanvas); 647tappedElement = InkCanvas.InnerCanvas.HitTestOnElements(pointOnInnerCanvas);
MS\Internal\Ink\SelectionEditingBehavior.cs (18)
62_hitResult = InkCanvas.SelectionAdorner.SelectionHandleHitTest( 63mouse.GetPosition((IInputElement)(InkCanvas.SelectionAdorner))); 69_selectionRect = InkCanvas.GetSelectionBounds( ); 72_previousLocation = mouse.GetPosition(InkCanvas.SelectionAdorner); 76InkCanvas.InkCanvasSelection.StartFeedbackAdorner(_selectionRect, _hitResult); 79InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 80InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 81InkCanvas.SelectionAdorner.AddHandler(UIElement.LostMouseCaptureEvent, 91InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(OnMouseUp)); 92InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnMouseMove)); 93InkCanvas.SelectionAdorner.RemoveHandler(UIElement.LostMouseCaptureEvent, 106(this.InkCanvas.FlowDirection == FlowDirection.RightToLeft)); 127Point curPoint = args.GetPosition(InkCanvas.SelectionAdorner); 143InkCanvas.InkCanvasSelection.UpdateFeedbackAdorner(newRect); 158_previousRect = ChangeFeedbackRectangle(args.GetPosition(InkCanvas.SelectionAdorner)); 378InkCanvas.SelectionAdorner.CaptureMouse(); 393InkCanvas.SelectionAdorner.ReleaseMouseCapture(); 400InkCanvas.InkCanvasSelection.EndFeedbackAdorner(commit ? _previousRect : _selectionRect);
MS\Internal\Ink\SelectionEditor.cs (18)
55Point currentPosition = Mouse.PrimaryDevice.GetPosition(InkCanvas.SelectionAdorner); 75InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(OnAdornerMouseButtonDownEvent)); 76InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 77InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseEnterEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 78InkCanvas.SelectionAdorner.AddHandler(Mouse.MouseLeaveEvent, new MouseEventHandler(OnAdornerMouseLeaveEvent)); 80Point currentPosition = Mouse.PrimaryDevice.GetPosition(InkCanvas.SelectionAdorner); 90InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(OnAdornerMouseButtonDownEvent)); 91InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseMoveEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 92InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseEnterEvent, new MouseEventHandler(OnAdornerMouseMoveEvent)); 93InkCanvas.SelectionAdorner.RemoveHandler(Mouse.MouseLeaveEvent, new MouseEventHandler(OnAdornerMouseLeaveEvent)); 114if ( InkCanvas.SelectionAdorner.IsMouseOver ) 117(this.InkCanvas.FlowDirection == FlowDirection.RightToLeft)); 149Point pointOnSelectionAdorner = args.GetPosition(InkCanvas.SelectionAdorner); 179Point pointOnSelectionAdorner = args.GetPosition(InkCanvas.SelectionAdorner); 203if ( InkCanvas.InkCanvasSelection.HasSelection ) 206hitResult = InkCanvas.SelectionAdorner.SelectionHandleHitTest(position); 212hitResult = InkCanvas.ResizeEnabled ? hitResult : InkCanvasSelectionHitResult.None; 216hitResult = InkCanvas.MoveEnabled ? hitResult : InkCanvasSelectionHitResult.None;