Open aviabdg opened 2 months ago
I have the same problem. It seems to be somehow related to the ScrollViewer. When I removed the ScrollViewer, the offset stopped jumping. For now, I've commented out the ScrollViewer but I'll need to add it back in at some point
I have a Window with UserControl (800x450), ScrollViewer -> ZoomBorder -> Canvas -> Image at 0, 0. The Image contains a Bitmap of size 8000x5153. When the application loads I set the starting zoom level to 0.25. The window displays the image. When I use the mousewheel to zoom in at the bottom right corner of the bitmap it will zoom in and then jump to an offset at the top left.
The debug output on the ZoomChanged event:
You can see that the offset jumps from -6015.566318079997, -3675.39389125 to -187.6854169599992, -93.34179327999982.
The further from 0, 0 you zoom the quicker it will jump.
Windows 10 .NET 8.0 Avalonia 11.0.11 PanAndZoom 11.0.0.3
Edit: the same happens with 11.1.0-rc1