Search code examples
c#uwpinkcanvas

Clear an InkCanvas [UWP]


I want to add a button to my UWP app that removes all the strokes from an InkCanvas, but the suggested method inkCanvas.InkPresenter.Strokes.Clear() isn't recognized as a valid command, is it obsolete or I am doing something else wrong?


Solution

  • Try inkCanvas.InkPresenter.StrokeContainer.Clear();.