locked
XAML/Visual Basic Windows 8 App (WebView)

    Question

  • I need help from the knowledgeable people of this website :)...

    Basically I would like to make a Metro App that will allow users to login and browse to certain websites, websites that will be allowed by using a Whitelist. There will also be a lot more features than just that, however, I am stuck on one major thing. What can I use to browse to these websites? WebView is not really an option as I have read that the App will not be launched on the App Store because they dont like you using WebView as a browser which I understand because it is meant to be a quick look at an HTML page. I did use to use the WebBrowser control in Windows Form Based applications which I know is not part of building a Win8 App. There surely must be a way to do this...

    Any help would be amazing.

    Monday, June 09, 2014 7:56 PM

Answers

  • I think you're referring to my blog post Ten Things You Need to Know About WebView
    You and Rob are correct - WebView isn't meant to be a general purpose browser.  Whitelisting webpages is actually a good reason to use a Store app with WebView. 

    Keep in mind that webpages intended for the general web may not work as expected in WebView.  This is why we don't intend WebView to be a general-purpose browser, as we have quirks that will not allow the website to work as expected, and would prefer a custom-written page as part of the app.



    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


    Monday, June 16, 2014 3:14 PM
    Moderator

All replies

  • WebView is the control provided to display HTML in a Windows Store app in Xaml. You are correct that the WebView is not designed as a general purpose browser and you may run into some limitations because of that.

    See App certification requirements for the Windows Store for the cert requirements.

    --Rob

    Monday, June 09, 2014 8:39 PM
    Owner
  • Do you have any suggestions of what could be used instead? I really want this to work as the idea I have could really work out. Do you think creating a Windows Form based application would be the only solution then maybe having a metro tile for it, sort of like the way Chrome works and such.

    Thank you for your reply.

    Monday, June 09, 2014 8:44 PM
  • If you want a Windows Store app then the WebView is the control provided to display HTML content. Are you running into a specific limitation with this?

    There are no other alternatives short of writing your own renderer. I would not recommend that. I'm not aware of any third party renderers.

    If you want to write a full browser similar to Chrome then see Developing a new experience enabled Desktop Browser, but that is a highly complex project not reasonable for most individual developers. This is designed for large teams such as those writing IE, FireFox, and Chrome.

    If your only concern is about the certification requirements then I recommend you read the requirements documentation so you can understand what they say about the WebView control and web browsers for yourself.

    --Rob

    Monday, June 09, 2014 9:01 PM
    Owner
  • Thank you again for your reply. I am not looking to write a full browser like Chrome IE etc. (I wish). I am looking at writing a very scaled down version.

    Say my application was geared towards sports then the browser itself would only let you access websites on its Whitelist. e.g. skysports.com etc. There is more to it involving profiles whereby different users would have different lists and permissions etc. I just do not want to do all the work just to find out that my application is using webview for the wrong reasons and it not be allowed to be published.

    The browser application itself would not have to deal with downloads or anything like that, maybe a script or two to allow media playback.

    Sorry this is not very clear but I do not want to give to much away as the concept is simple and would probably take an experienced developer just one day to create. I want this to be a long big project for me. That I can gain experience and learn new things from.

    Monday, June 09, 2014 9:10 PM
  • Why do you think this?
    I just do not want to do all the work just to find out that my application is using webview for the wrong reasons and it not be allowed to be published.
    If your only concern is about the certification requirements then I recommend you read the requirements documentation so you can understand what they say about the WebView control and web browsers for yourself.
    Monday, June 09, 2014 9:41 PM
    Owner
  • Hmm its a strange one, I have seen it somewhere that the WebView control its to bring html pages into your app. And if it is seen to be used as a general purpose browser then it will not be certified (I was looking for evidence but cannot find it).

    The app that I am wanting to create is basically a Web Browsing app however with a lot more control as in User profiles etc.

    The app store as far as I have read on this site and others would not accept an app that did a minimal style IE because well whats the point. But my idea is more than that, it brings Users profiles and websites sourced directly for a certain group of people.

    I am sorry for going around the world with this, your a great help.

    Monday, June 09, 2014 10:37 PM
  • I think you're referring to my blog post Ten Things You Need to Know About WebView
    You and Rob are correct - WebView isn't meant to be a general purpose browser.  Whitelisting webpages is actually a good reason to use a Store app with WebView. 

    Keep in mind that webpages intended for the general web may not work as expected in WebView.  This is why we don't intend WebView to be a general-purpose browser, as we have quirks that will not allow the website to work as expected, and would prefer a custom-written page as part of the app.



    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


    Monday, June 16, 2014 3:14 PM
    Moderator
  • Thank you Matt, you are exactly right I was referring to your blog post :)... Thank you very much for clearing that up for me and also thank you for reminding me that some web pages may not be loaded right etc. As i need this to be a constant reminder while taking this app forward.
    Monday, June 16, 2014 6:29 PM