Question

I am looking to move the InkPresenter in the InkCanvas to have a ZIndex that is lower than the Children of the InkCanvas.

In other words, I want to move the Ink so that it is displayed under the images and user controls that are added to the InkCanvas as Children.

I was wondering if there is a way to edit the Control Template of the InkCanvas to achieve this? I have been completely unsuccessful at accomplishing this task.

Originally I was using the InkCanvas as one layer and placed the children into a Canvas control that is on top of the InkCanvas; however, I want to be able to select the Children and the Strokes together...since the InkCanvas has this built in I was hoping to not use 2 controls like this.

Thanks.

-Frinny

Was it helpful?

Solution

I don't believe that what I was originally trying to do (move the InkPresenter under the Childeren) was possible.

I ended up using a Grid control with 2 sibling InkCanvas controls within it. One InkCanvas is strictly used for the ink strokes and the other is used for all of the children objects. I was then able to set the ZIndex of the controls so that the ink was displayed under the object controls. I had to manage the IsHitTestVisible property of the InkCanavas controls depending on whether the user was working with Objects or ink strokes.

I also considered adding the children to the Adorner layer of the InkCanvas but decided to go with using 2 InkCanvas controls instead.

-Frinny

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top