Xamarin site navigation
I am trying to detect when the location of a page in a response app changes using the Xamarin tview> web form event. However, it looks like it is only thrown when navigating to an external page and not to the response app, although I am using a react handler. In my browser, the URL changes, but Xamarin webview doesn't register the change, even if I manually poll the URL by printing webView.Source
.
Is there any way to detect navigation inside a responsive app from C #?
source to share
If you want the component to know about the location, you can wrap it with the HoC withRouter provided by React Router .
You can access the properties of history objects and closest match
<Route>
using a higher order component with Router. withRouter will re-render its component every time the route is changed with the same props as the render props: {match, location, history}.
Once you get location change updates in your react app, you can update your C # to do whatever you want.
EDIT: To answer your comment ...
Now I've never used C #, but according to my research it should work ... take a look at __doPostBack
. You can read about how to use it here .
source to share