question

DaljitSingh-1549 avatar image
0 Votes"
DaljitSingh-1549 asked ·

How to set a global InkToolbar for multiple InkCanvas controls in a ListView?

So I have a ListView which is a vertical list of InkCanvas controls. I know that InkToolbar allows you to set a TargetInkCanvas object to easily provide a control to change the properties of the canvas. However, I don't want to bind to as single InkCanvas, I would like to bind to all canvases in my List so when the user is drawing on them they will use the same pens on all the InkCanvas objects in the view.

windows-uwpwindows-uwp-xaml
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

RoyLi-MSFT avatar image
0 Votes"
RoyLi-MSFT answered ·

Hello,

Welcome to Microsoft Q&A!

From the InkToolbar.TargetInkCanvas Property you could see that this property is an InkCanvas object. That means the InkToolbar could be bind to only one InkCanvas at the same time. So you could not set a global InkToolbar for multiple InkCanvas at the same time.

Currently, what we could do is change the InkToolbar.TargetInkCanvas Property to different InkCanvas when needed so that the InkToolbar setting could be applied to different InkCanvas.

Please check the document here: https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.inktoolbar.targetinkcanvas#Windows_UI_Xaml_Controls_InkToolbar_TargetInkCanvas

https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.inktoolbar

·
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.