Show a web browser in your game
C#using CI.WSANative.Web;
You must have the internet client capability enabled in the app manifest, otherwise the WebView will not appear
C#WSANativeWebView.Create(new WSAWebViewSettings()
{
HorizontalPlacement = WSAHorizontalPlacement.Centre,
VerticalPlacement = WSAVerticalPlacement.Centre,
Height = 700,
Width = 700,
Uri = new Uri("https://google.co.uk")
});
C#WSANativeWebView.Destroy();
C#WSANativeWebView.Navigate(new Uri("http://www.claytoninds.com"));
Run custom scripts or ones that are loaded on the current page. More detailed documentation is available here
C#WSANativeWebView.InvokeScript("scriptName", arguments, result => {
});
Listen to these events for info about the webviews lifecycle
C#WSANativeWebView.NavigationStarting
C#WSANativeWebView.NavigationCompleted
C#WSANativeWebView.UnviewableContentIdentified
C#WSANativeWebView.DOMContentLoaded