Top

c# Tag

Interact with Javascript from C# using Xamarin.Forms

In one of our projects, we needed to make a navigation from a page that only contains a WebView rendering a web page, but only the web page knew when that behavior must happened, there is no way to know from the app point of view when it should happen, so we needed to call a C# method from the Javascript code of a web page.   How did we did it?   Hopefully we found this: https://docs.microsoft.com/es-es/xamarin/xamarin-forms/app-fundamentals/custom-renderer/hybridwebview   The idea is: A Xamarin.Forms View that contains the Url of the web page to load, and the method we want to call from Javascript. A renderer for each platform that will make the magic on every platform. public class HybridWebView :...

In one of our projects, we nee...

Read More