Zoombox from Xceed WPF Toolkit not working
Asked Answered
U

1

6

I am experimenting with the Zoombox control from Xceed, but I am having trouble getting it to respond to mouse wheel or pan events. Nothing happens when I use these inputs. Am I missing something in my code or configuration?

https://github.com/xceedsoftware/wpftoolkit

<Window x:Class="UI.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:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"

        mc:Ignorable="d"
        Title="MainWindow" Height="800" Width="700">
    <Grid>
        <xctk:Zoombox MinScale="0.5" MaxScale="100" >
            <Grid Width="600" Height="400" Background="Yellow">
                <Ellipse Fill="Blue" />
            </Grid>
        </xctk:Zoombox>
    </Grid>

</Window>
Unmask answered 19/8, 2017 at 17:49 Comment(0)
D
5

You have to define DragModifiers and ZoomModifiers. Default values are Ctrl and Shift keys. So use the combination Shift+MouseWheel for zooming and use Ctrl+LeftButton for panning.

enter image description here

Diaphanous answered 20/8, 2017 at 0:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.