Issue
I want to setup my raspberry pi 3 that is running Windows 10 IoT to display a webpage, specifically this page. My issue is, that looking at IoTBrowser sample code, and I can't figure out how to remove the buttons and address bar and get the webpage to autoload. So I'm asking if anyone has code I can use for it?
The instructions I was trying to follow for removing all the display elements except for the webpage its self can be found here, but it really confuses me.
Solution
My issue is, that looking at IoTBrowser sample code, and I can't figure out how to remove the buttons and address bar and get the webpage to autoload.
You can remove all buttons and address bar except webView
in xaml and utilize OnNavigatedTo
method to achieve autoload purpose. Then what you need are a few lines code like this:
In MainPage.xaml :
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<WebView x:Name="webView"/>
</Grid>
In MainPage.xaml.cs :
protected override void OnNavigatedTo(NavigationEventArgs e)
{
var address = "https://www.windowsondevices.com";
webView.Navigate(new Uri(address));
}
Answered By - Rita Han