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

Daljit Singh 261 Reputation points
2020-01-25T22:06:37.943+00:00

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.

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Roy Li - MSFT 32,051 Reputation points Microsoft Vendor
    2020-01-27T03:22:57.967+00:00

    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://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.inktoolbar.targetinkcanvas#Windows_UI_Xaml_Controls_InkToolbar_TargetInkCanvas

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

    0 comments No comments

0 additional answers

Sort by: Most helpful