Windows 物联网 Web 浏览器
Windows IoT Web Browser
我想设置我的 raspberry pi 3 即 运行 Windows 10 IoT 以显示网页,具体来说 this page。我的问题是,查看 IoTBrowser 示例代码时,我不知道如何删除按钮和地址栏并让网页自动加载。所以我问是否有人有我可以使用的代码?
可以找到我试图遵循的删除除网页本身之外的所有显示元素的说明 here,但它确实让我感到困惑。
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.
可以去掉xaml中除webView
以外的所有按钮和地址栏,利用OnNavigatedTo
方法达到自动加载的目的。那么你需要的是这样的几行代码:
在MainPage.xaml中:
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<WebView x:Name="webView"/>
</Grid>
在 MainPage.xaml.cs 中:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
var address = "https://www.windowsondevices.com";
webView.Navigate(new Uri(address));
}
我想设置我的 raspberry pi 3 即 运行 Windows 10 IoT 以显示网页,具体来说 this page。我的问题是,查看 IoTBrowser 示例代码时,我不知道如何删除按钮和地址栏并让网页自动加载。所以我问是否有人有我可以使用的代码?
可以找到我试图遵循的删除除网页本身之外的所有显示元素的说明 here,但它确实让我感到困惑。
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.
可以去掉xaml中除webView
以外的所有按钮和地址栏,利用OnNavigatedTo
方法达到自动加载的目的。那么你需要的是这样的几行代码:
在MainPage.xaml中:
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<WebView x:Name="webView"/>
</Grid>
在 MainPage.xaml.cs 中:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
var address = "https://www.windowsondevices.com";
webView.Navigate(new Uri(address));
}