Windows phone 7 如何在web浏览器控件上显示数据?
我想在web浏览器中显示简单的字符串。根据下面的代码,当我运行应用程序时,它不会显示任何字符串,也不会给出错误 那么如何在WebBroser控件中显示字符串或html内容呢 XMl代码是Windows phone 7 如何在web浏览器控件上显示数据?,windows-phone-7,Windows Phone 7,我想在web浏览器中显示简单的字符串。根据下面的代码,当我运行应用程序时,它不会显示任何字符串,也不会给出错误 那么如何在WebBroser控件中显示字符串或html内容呢 XMl代码是 <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <phone:WebBrowser HorizontalAlignment="Left" Margin="9,6,0,0" Name="webBr
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<phone:WebBrowser HorizontalAlignment="Left" Margin="9,6,0,0" Name="webBrowser1" VerticalAlignment="Top" Width="441" Height="595" Foreground="Black" />
</Grid>
我的C#cod是:
publicpage2()
{
初始化组件();
webBrowser1.Loaded+=WebBrowser_OnLoaded;
}
私有void WebBrowser_已加载(对象发送方,路由目标e)
{
//欢迎使用F5debug!要获得更多更新,请访问www.F5debug.net
webBrowser1.NavigateToString(“你好”);
}
这样行吗
public Page2()
{
InitializeComponent();
webBrowser1.Loaded += WebBrowser_OnLoaded;
}
private void WebBrowser_OnLoaded(object sender, RoutedEventArgs e)
{
//<html><head><meta name='viewport' content='width=480, user-scalable=yes' /></head><body><h2>Welcome to F5debug!</h2><p>To get more updates visit www.f5Debug.net</p></body></html>
webBrowser1.NavigateToString("hello");
}
public Page2() {
{
InitializeComponent();
webBrowser1.NavigateToString("hello");
}
}