Hello,
Renderer is deprecated in MAUI, where you can use Handler to implement this feature.
Please refer to the following code, I tested it on Android and it triggers the event as expected when scrolling to the bottom.
<local:ScrollWebView x:Name="scrollWeb" Source="
https://cn.bing.com/"
HeightRequest="300"/>
in code-behind:
protected override void OnHandlerChanged()
{
base.OnHandlerChanged();
#if ANDROID
var s = scrollWeb.Handler.PlatformView as Android.Webkit.WebView;
if (s != null) {
s.ScrollChange += (s, e) =>
{
var nativeWebView = e.V as global::Android.Webkit.WebView;
int height = (int)Math.Floor(nativeWebView.ContentHeight * nativeWebView.Scale);
int webViewheight = nativeWebView.Height;
int cutOff = height - webViewheight;
if (e.ScrollY >= cutOff - 40)
{
scrollWeb.IsBottomReached = true;
}
else
{
scrollWeb.IsBottomReached = false;
}
};
}
#endif
}
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.