0

I'm trying to set the ZoomOrigin of the Zoombox in the xaml, but if I set a coordinate, it will not zoom anywhere.

<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <xctk:Zoombox x:Name="zoom" ZoomOrigin="20,20">
           <Image Source="Green.png" Height="200" Width="200"/> 
        </xctk:Zoombox>
    </Grid>
</Window>

I just want the origin of the zoom to be a set of coordinates decided by me, not by default.

Without setting ZoomOrigin it zooms in the middle of the zoom box - where I put the mouse cursor doesn't matter since the zoom will only occur in the middle of the box.

Trying to set the ZoomOrigin to a value breaks everything and it stops zooming.

Rann Lifshitz
  • 4,040
  • 4
  • 22
  • 42
Baugog
  • 9
  • 1

0 Answers0