dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.04k stars 1.16k forks source link

NullReferenceException when drawing in InkCanvas after editing mode change #3840

Open miloush opened 3 years ago

miloush commented 3 years ago
private void OnStrokeCollected(object sender, InkCanvasStrokeCollectedEventArgs e)
{
    _canvas.EditingMode = InkCanvasEditingMode.Select;
}

private void OnInkClick(object sender, RoutedEventArgs e)
{
    _canvas.EditingMode = InkCanvasEditingMode.Ink;
}
  1. Draw (I am using mouse) on the canvas, upon finishing the stroke the canvas should change to selection mode
  2. Click the button to change the canvas back to inking mode
  3. Draw again - crash on mouse down
TwilightLemon commented 3 months ago

Have you solved this problem? I have the same one on .NET 8 while switching Edit Mode of InkCanvas...

lindexi commented 3 months ago

@TwilightLemon Sorry, no. I can repro this issues on .NET 8.