wieslawsoltes / PanAndZoom

Pan and zoom control for Avalonia.
http://wieslawsoltes.github.io/PanAndZoom/
MIT License
345 stars 45 forks source link

[WPF]Resizing the window resets the view #7

Closed clembu closed 7 years ago

clembu commented 7 years ago

Hello,

I'm trying this control out, and I like how the zoom behaves with a static window, but whenever I change the size of the window, the zoomborder resets.

Xaml looks like this.

        <paz:ZoomBorder x:Name="zoomBorder" AutoFitMode="None" ZoomSpeed="1.2" ClipToBounds="True"
                        Background="DarkGray"
                        VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
            <Canvas x:Name="canvas">
                <Image x:Name="wp_img"/>
            </Canvas>
        </paz:ZoomBorder>

I thought "oh, maybe it's that auto-fit thing", so I copied the key input bit from the demo, and tried to fiddle, but whenever I enable "Extent" or "Fill", my image just disappears from view. Any idea what might be happening?

wieslawsoltes commented 7 years ago

@facelesspanda Fixed this issue in latest nightly build. https://github.com/wieslawsoltes/PanAndZoom#nuget