0

Hi I am developing a WPF application. The web browser control takes a long time to load the page. Is there a way to display some text before the page loads . The .Documenttext is not available is not available in WPF .

1) Is there a way to make the web browser control faster.

2) Is there a way to display some text before the page loads.

I am currently using visual studio 2010 and I am using the following code to navigate to the page

public Window3()
    {
        InitializeComponent();
        this.Loaded += new RoutedEventHandler(Window3_Loaded);
    }

    public void Window3_Loaded(object sender, RoutedEventArgs e)
    {

        webBrowser1.Navigate(new Uri("http://www.google.com")));
    }
Jayant Rao
  • 191
  • 1
  • 5
  • 15

1 Answers1

3

You could first call NavigateToString and pass in some initial HTML or simply Navigate to a local page, then try to go browse the other site.

Something like

webBrowser.NavigateToString(@"<html><body><h1>PageLoading</h1></body></html>");

or

webBrowser.Navigate(@"/index.html");
Seth Moore
  • 3,575
  • 2
  • 23
  • 33