The RenderTargetBitmap class worked with simple Canvas + InkManager (in Windows 8.1) to render ink strokes to an image.
UWP introduced InkCanvas and a new Inking API. However, it seems like the RenderTargetBitmap
does not work with that. When I try to capture ink strokes with RenderAsync
method, no ink strokes get rendered only other objects like Rectangle and so on.
Is it a bug or this new API is not meant to be used this way? If not, then how can I render an image out of InkCanvas
?
Thanks!
Please try InkPresenter.StrokeContainer property http://blogs.windows.com/buildingapps/2015/09/08/going-beyond-keyboard-mouse-and-touch-with-natural-input-10-by-10/
Here is how I solved this issue with Win2D. First of all, add
Win2D.uwp
nuget package to your project. Then use this code: