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

  • Question

  • Hi,

    I'm UWP newbie, currently I'm 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>

    Thank you!


    Tuesday, June 23, 2020 2:47 PM

All replies

  • Hi,

    Your issue is a development issue that is out of the scope of current forum. You could ask development question in other forums like Microsoft QA and StackOverflow with UWP tag.

    Best regards,

    Roy


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Wednesday, June 24, 2020 2:25 AM