private void handleKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.F9) { _points.Clear(); DrawSurface.InvalidateVisual(); parent.CloseDrawWindow(); } }
private void SKElement_MouseMove(object sender, MouseEventArgs e) { var p = e.GetPosition(DrawSurface); if (_painting) { _points.Add(new DrawPoint { X = (float)p.X, Y = (float)p.Y }); DrawSurface.InvalidateVisual(); } }
protected override void OnViewportWidthChanged(long oldValue, long newValue) { DrawSurface?.InvalidateVisual(); }