Hi,
I currently have a custom user control for drawing lines as an overlay to a ZoomContentControl which is ued to shows a image.
Drawing and everthing works fine, besides the zooming to some point.
I had to use ScaleTransform on my control to match the zoom level. But unfortunately the rendering is for some zoomlevels is incomplete. It just renders the half of my control.
Here is simplified code snipped.Thanks in advance.
Kind regards
Luke G.
I currently have a custom user control for drawing lines as an overlay to a ZoomContentControl which is ued to shows a image.
Drawing and everthing works fine, besides the zooming to some point.
I had to use ScaleTransform on my control to match the zoom level. But unfortunately the rendering is for some zoomlevels is incomplete. It just renders the half of my control.
Here is simplified code snipped.
<navigation:ZoomContentControl
x:Name="ZoomBox"
IsViewControlPaneVisible="False"
MinZoomLevel="0.1"
MaxZoomLevel="10.0"
ZoomStep="0.1">
<navigation:ZoomContentControl.Overlays>
<local:ObjectDrawingControl Height="{Binding BitmapSource.Height, Mode=OneWay}"
Width="{Binding BitmapSource.Width, Mode=OneWay}">
<local:ObjectDrawingControl.RenderTransform>
<ScaleTransform ScaleX="{Binding ElementName=ZoomBox, Path=ZoomLevel}"
ScaleY="{Binding ElementName=ZoomBox, Path=ZoomLevel}" />
</local:ObjectDrawingControl.RenderTransform>
</local:ObjectDrawingControl>
</navigation:ZoomContentControl.Overlays>
<Image Source="{Binding BitmapSource, Mode=OneWay}" />
</navigation:ZoomContentControl>
Kind regards
Luke G.