0
votes

I am looking for a way to zoom figures (say a polyline) on a canvas without zooming the canvas background image. I have a solution that zooms figures and the background image at the same time by varying the canvas scaletransform, now I would like only the figure to zoom. Here attached are the example pictures of what I would like to get.

image before zoom

image after zoom

I have tried to play with Layout transform and vary the transformscale of the figures but it didn't do the trick. Any ideas on how I could achieve that?

1
Use a Path control, assign a Geometry to its Data property, and set/update the Transform property of the Geometry.Clemens

1 Answers

0
votes

I might misunderstand your demand, but does it go like this?

<Grid>
    <Canvas x:Name="backgroundCanvas" />
    <Canvas x:Name="figureCanvas">
      <Canvas.RenderTransform> ...
    </Canvas>
</Grid>

Two Canvases are overlaid and then the transform is performed separately.