How Printing stroke InkCanvas

Open
#1,068 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
10/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Domain
desktop

Research direction

The issue names no repository file or test to inspect. Review the InkCanvas, InkPresenter, StrokeContainer, and PrintHelper context described in the report; done means confirming that the problem is outside the toolkit and closing the issue rather than making a code change.

Written by the indexing model from the issue text.

Description

Depending on how the InkCanvas works, you will not be able to print the drawings using the PrintHelper of the toolkit directly.
To get the drawings of the InkCanvas, you can use the InkPresenter property, which is in charge of the drawings. From there, you can use the StrokeContainer, which allows you to save the strokes of the drawing with the SaveAsync method. With a InkPersistenceFormat of GIFWITHEMBEDDEDISF, you will get the drawing in GIF format within a IOutputStream.
Once you have GIF in a stream, you can add it to the view with an Image control, which you can then add to the print items and print it.
Close the problem as the problem is not related to the toolkit

Dominant language
JavaScript
Stars
9.7k
Forks
7.8k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/Windows-universal-samples

All issues in microsoft/Windows-universal-samples

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.