-1

This is in reference to the following answer: c# pan and zoom image

I want to add a grid that scales along with the image. I've tried adding a canvas with IsHitTestVisible = "False" and use border.RenderTransforms.Value.OffsetX which gives a value, but doesn't update. I also tried ((TransformGroup)border.RenderTransform).Children.First(tr => tr is ScaleTransform)) but it provides a MatrixTransform instead of a Scale.

Basically, I'm looking to share the ScaleTransform and TranslateTransform values from the ZoomBorder class object and place them into a canvas.

Community
  • 1
  • 1
Nathan S
  • 9
  • 4

1 Answers1

-1

After some trials, I found that a simple canvas.RenderTransform = image.RenderTransform works well.

Nathan S
  • 9
  • 4