CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.89k stars 1.38k forks source link

Export as Image from InfiniteCanvas #2672

Closed RobbyRobbyRobby closed 5 years ago

RobbyRobbyRobby commented 5 years ago

Hi!

I'm submitting a Feature Request for the InfiniteCanvas control. https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/36041110-infinite-canvas-export-image

Current behavior We can export as JSON Ink record.

Desired behavior Be able to export as JPG/PNG/etc, or access the underlying InkCanvas so we can use the StrokesContainer to do it ourselves.

Package Version(s): 5.0

Thanks! If I'm missing something already available, many apologies. Rob.

michael-hawker commented 5 years ago

I don't know if we've tested using RenderTargetBitmap on the InfiniteCanvas. I should try and take a look at that later.

Ping @IbraheemOsama, any thoughts?

michael-hawker commented 5 years ago

Collecting some other threads here too from StackOverflow and Forums.

There's also the AppRecordingManager but that's the whole app not the canvas.

And @nmetulev's Blog Post

IbraheemOsama commented 5 years ago

I'm not sure if RenderTargetBitmap would work or not because I'm using Win2D Surface Drawings, but let me do a quick POC to try :)

Also exporting the InkCanvas will save only the strokes and not the text.