private void button1_Click(object sender,RoutedEventArgs e) { webBrowser1.Navigate(new Uri(“http://www.google.com”,UriKind.RelativeOrAbsolute)); }
// xaml code
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,164">
<phone:WebBrowser HorizontalAlignment="Left" Source="{Binding Path=WebAddress}" Margin="9,0,0,0" Name="webBrowser1" VerticalAlignment="Top" Height="576" Width="441" IsScriptEnabled="True"/>
</Grid>
<Button Content="Button" Grid.Row="1" Height="72" HorizontalAlignment="Left" Margin="158,591,0,0" Name="button1" VerticalAlignment="Top" Width="160" Click="button1_Click" />
</Grid>
答案 0 :(得分:0)
您似乎正在尝试绑定WebBrowser.Source属性。这不是依赖属性,因此不可绑定。请参阅以下两点:
答案 1 :(得分:0)
这是显示驱动程序的问题。我系统中的驱动程序是WDDM 1.0。