Search code examples
silverlight-4.0webbrowser-controlhtmlsilverlight-oob

How to open a non-silverlight WebPage in Silverlight OOb App?


My problem is I want to open a URL (non-Silverlight webpage) in a Silverlight Out-of-browser(SL-OOB) Application but in another window/page/etc. This webpage will return some content, that will be rendered accordingly to the functionality on this webpage, that means I want a Loaded/document_completed Event fired on page render/reload/postback in this control/webbrowser etc.

For instance, you can take a login screen, which is hosted on a different URL. When you open your SL-OOB App, you want to login, the above mentioned process should be followed and on the result returned from the webpage/control, the user should be logged-in.

I want to open this webpage in a childwindow of SL-OOB app.

For instance http://www.silverlight.net/content/samples/apps/facebookclient/sfcquickinstall.aspx

I have tried many things but couldn't get the answer.

Do tell me the best and easy solution.

Thanks in advance for the great help you all will be doing to me.


Solution

  • public class ClickableLink : HyperlinkButton
        {
            public ClickableLink(Uri uri)
            {
                NavigateUri = uri;
            }
            new public void Click()
            {
                base.OnClick();
            }
        }
    

    Create object and call .Click() but note that this must be user initiated; putting it in a thread or without a user action will cause it to be ignored, a genius security feature from MS.