ZoomContentControl Overlay ScaleTransform

Navigation for WPF Forum

Posted 13 years ago by Luke G.
Version: 11.1.0542

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.
        <local:ObjectDrawingControl Height="{Binding BitmapSource.Height, Mode=OneWay}"
                                    Width="{Binding BitmapSource.Width, Mode=OneWay}">
                <ScaleTransform ScaleX="{Binding ElementName=ZoomBox, Path=ZoomLevel}"
                                ScaleY="{Binding ElementName=ZoomBox, Path=ZoomLevel}" />
    <Image Source="{Binding BitmapSource, Mode=OneWay}" />
Thanks in advance.

Kind regards

Luke G.

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Luke,

I suspect your control is being clipped, by either the Clip/ClipToBounds property, or the GetLayoutClip virtual method. For the latter, you can override GetLayoutClip and return null to effectively disable it.

If that doesn't help please put together a small sample project that reproduces your issue and email it over then we can take a closer look. Be sure to remove any executables or change the extension of the zip file to ensure it gets past our email filters.

Actipro Software Support

Posted 13 years ago by Luke G.

I solved my problem when using LayoutTransform instead of RenderTransform.

Best regards

Luke G.
The latest build of this product (v24.1.2) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.