0
votes

webBrowser in windows phone 7 is not displaying webpage. It is not showing any errors and displaying empty page. I was trying to open google.com page. The code is as follows:

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>
2

2 Answers

1
votes

You appear to be trying to bind the WebBrowser.Source property. This is not a dependancy property, so is not bindable. See two following:

databind the Source property of the WebBrowser in WPF

0
votes

It is the problem with display drivers. The drivers which i had in my system is WDDM 1.0.