Forum Xamarin Xamarin.Forms

Webview (or) Zoomable image inside scroll view - Vertical zooming is not working in Android

    <ScrollView VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" x:Name="hello">
                      <Grid> 
                        <BoxView BackgroundColor="Red" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="10" HeightRequest="200"/>
                        <BoxView BackgroundColor="Black" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="10" HeightRequest="200"/>
                        <BoxView BackgroundColor="Yellow" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="10" HeightRequest="200"/>
                        <WebView HorizontalOptions="FillAndExpand" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="10" x:Name="pdfviewer" HeightRequest="500" WidthRequest="500" VerticalOptions="Center" />
                        </Grid>
    </ScrollView>

Answers

  • ziyueziyue CNMember ✭✭

    @Manikandan_S
    I meet the same issue, do you know how to resolve this problem?

  • AlmaJensen.9398AlmaJensen.9398 USMember ✭✭✭

    I don't know about inside of a Scrollview. But the way I've seen this done required access to pinch and pan gesture recognizers which would then manipulate the scale, translatex, and translatey properties of the image. The cheap way I've seen this done was to load the image into a webview inside of a hardcoded webpage utilizing a metatag that allows the pinch zooming/panning on the page.

Sign In or Register to comment.