question

Madhu-8808 avatar image
0 Votes"
Madhu-8808 asked ·

Painting on UWP app

Hi,

We are building a UWP app which needs the user to write on top of the content of our app using touch. For e.g it is similar to some teaching app on a big screen, and while teaching he wants to mark on some content etc..

The features related to painting is exactly similar to the Scenario3 here https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/SimpleInk/cs

But the only difference is here it writes on InkCanvas. In our case we need to write on top of out content. It can contain different content. So is it possible to put a transparent InkCanvas on top of our other content, so user will see our content, but can paint on the InkCanvas?

If that is not possible can you please tell me what are the other options we have to implement such feature.

Here is a example of what we want to do alt text

Thank You.


windows-uwp
paint.png (209.7 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

$$ANON_USER$$ avatar image
1 Vote"
$$ANON_USER$$ answered ·

So is it possible to put a transparent InkCanvas on top of our other content, so user will see our content, but can paint on the InkCanvas?

Hello,

Sure, you could place InkCanvas on top of your content. But it will disable the lower control input behavior. So, I mean, you need add a method to make InkCanvas Collapsed when you want to touch the lower control.

 myInkCanvas.Visibility = Visibility.Collapsed

In general, we often make a specific place to set InkCanvas , and it will not cover the other element.

· 5 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you anonymous user As in the above image, what I want to do is, I want to write or underline/circle some thing on the existing image/text etc.. like the Test Writing I have written there on top of existing content. So the InkCanvas area should not be visible, but only the writing should be visible. Is there a way to make it transparent? In our case we will need to have it cover the other elements and not in a specific separate place. Will there be an issue doing that? Can you please explain a bit how I can achieve the above. Really appreciate it. Thank you.

0 Votes 0 ·

The default background of InkCanvas is transparent, you could place on the top of element that you want make tag, I tried and it works well.

1 Vote 1 ·

Thank you very much. We'll try that.

0 Votes 0 ·

![demo][1] [1]: /answers/storage/temp/482-批注-2019-11-19-175647.jpg

0 Votes 0 ·

It works for a simple UI with some text block etc.. but when we add the InkCanvas to our page which has some web views, it doesnt write on top of that. Any thoughts on how we can add it to come over the web views. Is there a z index like property we can set for this?

0 Votes 0 ·