WP7 - How to embed my xap in a webpage - silverlight

I have made a Windows Phone 7 app and I would like to embed it in a webpage.
I found two examples to help explain what I want to do:
http://www.lifewaresolutions.com/deluxe_moon_demo_wp7.html
http://help.arcgis.com/en/arcgismobile/10.0/apis/WindowsPhone/samples/start.htm
I have looked at the page sources for both of these websites and have tried to mimic what they have down, but the farthest I have gotten is a webpage with a silverlight app in the middle, but my app doesn't start.
I am not that familiar with web development, but if someone could help me create a simple html page with my wp7 app embedded in it, that would be great.

The Silverlight desktop computer plugin can't execute Windows Phone Silverlight apps.
The two example websites embed a "classic" Silverlight app within a fake Windows Phone chrome.
So basically what you can do to have something similar is:
Create a new Silverlight 4 "classic" project
Implement your app (you can share code between the new project and your existing WP7 code)
Retemplate the controls to make them look like the Windows Phone ones
Embed the app within a WP7 chrome on a website

Related

How to play youtube vidoes in silverlight(in browser)?

I want to develop an silverlight application which plays youtube videos. I dont want to let users install my silverlight application on thri PCs, so I would need to play the videos in browser. Is there anyway we can achieve this?
Silverlight 4 comes with a new WebBrowser control which lets you display HTML content (e.g. an iframe with youtube in it). Unfortunately, that control will work in Out-Of-Browser mode only. So if you don't want users to install your app on their PCs, that won't be an option for you.
So the only ways I see to work around that problem are
A) Open a popup (new browser window) which shows youtube content.
B) Use JavaScript to open a new div/iframe on top of your Silverlight app which shows youtube. You will have to enable the so-called windowless mode for your Silverlight app then (otherwise, you won't be able to display any kind of HTML on top of your app).
Cheers, Alex

Facebook Connect in Silverlight

Is there a good way to get Facebook Connect onto a Silverlight page? All I really need is simple authorization/registration. I've looked into the facebook developer toolkit, but the documentation is more or less non-existent for Silverlight, and I didn't really get anywhere with it.
Is there a good tutorial or a working library for adding Facebook Connect into a Silverlight app? Or is the best way to run Silverlight in Windowwless mode with HTML overlayed on top?
Are you looking for something like that? http://apps.facebook.com/chatmotion/
Before developing this small test app i took a look at these samples: http://facebooktoolkit.codeplex.com/releases/view/39727
Make sure to download the newest source code of the Facebook Development Kit for .NET and build it yourself since the release version(January) didn't work for me correctly.
Let me know if you have any problems.
I've decided to use the WebBrowser control that was added in Silverlight 4 to accomplish this.

TestPage.aspx in silverlight

I am a beginner in silverlight. I want to know what is TestPage.aspx and TestPage.html in silverlight. Actually i have google it but din't get enough information. Can any one give me answer??
TestPage.aspx and TestPage.html are the pages which will host your Silverlight content. As you might know, Silverlight is just a project (not a web application) and needs a page that can host it.
These pages are created by default and help you to test your XAML content during your development, which you can later remove from your project.
TestPage.html is dynamically generated by the Silverlight application as part of the Debug process. If you take a look at the Debug tab for the application properties you will see an option to Dynamically generate a test page. If this is selected then you TestPage.html is created in the /Bin/Debug folder of your Silverlight application.
A better solution is to create a web application in the same solution as your Silverlight application then in the properties for the web application go to the Silverlight Applications tab and add your existing Silverlight app to the web project. Also make sure that the Silverlight checkbox is ticked in the Debuggers section of the Web tab of your web application.

Create a Mobile Web User Control

I am making mobile web pages to be accessed by smartphones and such.
I do not see either Mobile Web Form, or Mobile Web User Control in the list of installed templates in Visual Studio.
I probably need some mobile toolkit or something like that, but I can never find what I am looking for on MSDN. Anyone know what I need to do?
Try downloading the Mobile Web Application Template for Visual Studio.
Source: http://geekswithblogs.net/ranganh/archive/2008/04/01/mobile-web-forms-in-visual-studio-2008.aspx

Is it possible to start a client-side app from Silverlight?

I have a simple company portal which allows users to start their apps from the browser. The URLs in the hypelinks are passed (using Javascript) to a signed applet to actually start the client-side apps. All clients are XP or Vista and all run IE6 or IE7.
I have recently been looking at Silverlight and am wondering if I could do something similar. Ideally, I'd like to do everything from Silverlight and get rid of the applet.
Is it possible to call client-side apps from Silverlight? Can I sign a Silverlight app to give it extra rights?
You can call javascript from silverlight just as use use javascript with links.
For example to call somefunction with parameter:
HtmlPage.Window.CreateInstance("somefunction", new string[] { "parameter1" });
There's a good video about Html Browser integration here
You should revisit this now that Silverlight 4 is out. You can see how to run an exe from HERE.

Resources