我有这个 Xamarin 表单页面:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TestApp1"
x:Class="TestApp1.MainPage">
<ContentPage.Content>
<StackLayout Orientation="Vertical">
<WebView Source="http://www.google.de" HeightRequest="3000" WidthRequest="100"/>
</StackLayout>
</ContentPage.Content>
</ContentPage>
当我打开应用程序时,在谷歌提示中输入任何内容,我无法在结果页面上滚动。我如何启用此功能?
当我搜索“xamarin webview启用滚动”时,我只找到有关禁用它的信息......
创建您自己的渲染器并重写此方法,如下所示:
public override bool DispatchTouchEvent(MotionEvent e)
{
Parent.RequestDisallowInterceptTouchEvent(true);
return base.DispatchTouchEvent(e);
}
请在此链接中查找详细信息 https://github.com/xamarin/Xamarin.Forms/issues/5205#issuecomment-507530412
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)