I did what is explained here:
https://developer.xamarin.com/guides/xamarin-forms/working-with/webview/
I wrote this code which works well:
{
public interface IBaseUrl { string Get(); }
public class BaseUrlWebView : WebView { }
class LessonPage:ContentPage
{
public LessonPage()
{
BaseUrlWebView lessonWebview = new BaseUrlWebView();
var htmlSource = new HtmlWebViewSource();
htmlSource.Html = @"<html>
<head></head>
<body>
<p><a href=""theory_fr.html"">next page</a></p>
</body>
</html>";
htmlSource.BaseUrl = DependencyService.Get<IBaseUrl>().Get();
lessonWebview.Source = htmlSource;
this.Content = lessonWebview;
}
}
}
What should i write to get my local html file "theory_fr.html" directly in my webview, not through a html string ?