none
Launch browser from app (and that's it) RRS feed

  • General discussion

  • Does anyone know how I would simply launch a website when the app loaded, and then prevent the app from doing anything else? I'm not sure this is the approach I would go with, but just curious if it's even possible to simply call the WebBrowserTask from app.xaml.cs and then stop the app from showing the MainPage.xaml. Thanks
    Friday, November 12, 2010 2:31 AM

All replies

  • Hi,

    You could use a WebBrowser control on your page and set IsHitTestVisible to false.
    Friday, November 12, 2010 2:35 AM
  • Sorry, I didn't mean not let the user interact with the web page, I just meant keep the silverlight app from loading MainPage.xaml. Just launch the webbrowsertask to show the web page. I'm currently using webbrowser, but just wondering if I might be better off just browsing to the app using the browser directly.
    Friday, November 12, 2010 2:39 AM
  • No worries. Does WebBrowser do the job you want or do you specifically want WebBrowserTask? Just thinking if WebBrowser works for you then you've got what you're looking for basically.
    Friday, November 12, 2010 2:46 AM
  • It does.. the only thing extra I would get by running in the full browser is it would give the user the page loading bar when they are navigating between pages.
    Friday, November 12, 2010 2:49 AM
  • the only thing extra I would get by running in the full browser is it would give the user the page loading bar when they are navigating between pages.
    You can display your own page loading bar on the WebBrowser control. I don't think you can get the navigation percentage completed from WebBrowser, but it has Navigating and Navigated events and you can at least display the indeterminate ProgressBar moving dots while navigating between pages. Overlay a ProgressBar (preferably use PerformanceProgressBar) on top of the WebBrowser and make it visible/collapsed according to the Navigating/Navigated events.

    Richard
    Friday, November 12, 2010 9:25 AM
  • I just threw a progress bar on my page, and no matter what I set the Height to, it just display a thin blue line. Probably 10px. What am I missing? Thanks
    Friday, November 12, 2010 3:47 PM
  • nevermind. had to edit the template.
    Friday, November 12, 2010 5:36 PM