Navigation and destroying when going back

Hi! I need some light on this issue. I have the following navigation defined

		<Navigator>
			<CatalogPage ux:Template="Catalog" router="router" />
			<VideoDetailsPage ux:Template="VideoDetails" router="router" />		
			<VideoWebViewPage ux:Template="VideoWebView" router="router" />	
		</Navigator>

The last one VideoWebView it’s a WebView with a player. When I hit the back button in Android that page still exists (somewhere) and the video continues to play. How can I destroy it or make the webview navigate to about:blank?

Thanks!

You can use a trigger to explicitly navigate away from the webpage when you leave that page in the app.
Something along the lines of:

<Deactivated>
    <Set myWebView.Url="about:blank"/>
</Deactivated>

It worked perfectly, thanks!

Remi Pedersen wrote:

You can use a trigger to explicitly navigate away from the webpage when you leave that page in the app.
Something along the lines of:

<Deactivated>
    <Set myWebView.Url="about:blank"/>
</Deactivated>

I tried this and added

<Activated>
    <Set myWebView.Url="{url}"/>
</Activated>

But for some reason it’s not getting triggered when I go back to that screen. Is there something else to it?

Try this instead: <Set Target="myWebView.Url" Value="{url}"/>

There’s an issue with combining the short-hand version of Set with databinding. I suspect that could be the reason here.