[UWP] How to disable Ctrl key while zooming in ScrollViewer?

Phap Duong 1 Reputation point
2020-06-24T02:56:04.583+00:00

Hi,

I'm currently using ScrollViewer control to zoom an image, I manage to set ZoomMode="Enabled" to enable the zooming function. But the problem is, it only works by holding Ctrl key and mouse wheel!

Is there any way to just using mouse wheel? Or change the other key?

My code:

<ScrollViewer
    ZoomMode="Enabled" 
    HorizontalScrollMode="Enabled" 
    VerticalScrollMode="Enabled" 
    HorizontalScrollBarVisibility="Auto"
    VerticalScrollBarVisibility="Auto">

    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
        <Image Source="aaa.jpg" />
    </Grid>
</ScrollViewer>

Thanks!
Phap

Universal Windows Platform (UWP)
{count} votes