首页 > 解决方案 > Xamarin.Forms - WebKit WebView (SKLn-Rad/Xam.Plugin.Webview) 垂直滚动问题

问题描述

我在使用 SKLn-Rad HybridWebView 时遇到问题。当尝试向下滚动时,视图会上升,反之亦然。我认为一般来说是 WebView 的一个问题,因为在使用这个混合 webview 之前我有同样的问题。

XAML 代码:

<StackLayout
        Padding="3"
        BackgroundColor="#e2cedf"
        HorizontalOptions="FillAndExpand"
        VerticalOptions="FillAndExpand">

        <Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
            <Grid.RowDefinitions>
                <RowDefinition Height="40" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="40" />
                <ColumnDefinition Width="40" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="40" />
                <ColumnDefinition Width="40" />
            </Grid.ColumnDefinitions>

            <webview:FormsWebView
                x:Name="WebContent"
                Grid.Row="1"
                Grid.Column="0"
                Grid.ColumnSpan="5"
                ContentType="Internet"
                HorizontalOptions="FillAndExpand"
                OnContentLoaded="OnNavigated"
                OnNavigationCompleted="OnNavigated"
                OnNavigationStarted="OnNavigating"
                Source="https://purpuraylimon.com/"
                VerticalOptions="FillAndExpand" />

        </Grid>

    </StackLayout>

标签: androidwebviewxamarin.forms

解决方案


推荐阅读