Beispiel #1
0
 private void handleKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.F9)
     {
         _points.Clear();
         DrawSurface.InvalidateVisual();
         parent.CloseDrawWindow();
     }
 }
Beispiel #2
0
        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();
            }
        }
Beispiel #3
0
 protected override void OnViewportWidthChanged(long oldValue, long newValue)
 {
     DrawSurface?.InvalidateVisual();
 }