0

In my UWP App I am using an InkCanvas within a Popup. Everything is working great, but when the popup is not filling the whole screen i can draw outside of the popup. After saving the StrokeContainer to a file also the lines out of the bounds are visible. This is very bad, because i added a background to the strokecontainer and i want to limit the user to draw onto it.

Is there a way to prevent drawing out of bounds? Or can i cut everything that is outside the visible area?

M.D.
  • 273
  • 1
  • 5
  • 18

1 Answers1

0

I have found a workaround:

Before the StrokeContainer is saved to file i create a new StrokeContainer with a new Background Image matching the dimensions of the input strokes. The i clone all the strokes into the new container and save the new one.

I know that this is no solution for everybody, but in my case i just want to have a white background, so it's working.

M.D.
  • 273
  • 1
  • 5
  • 18