Skip to main content

Microsoft Silverlight

Answered Question Include a HTML tag (video) from Silverlight App in a webpageRSS Feed

(0)

CARNIBAL06
CARNIBAL06

Member

Member

0 points

5 Posts

Include a HTML tag (video) from Silverlight App in a webpage

 Hi,

 

I have a datagrid who show several videos. When user click on a video, i would like play it. 

First, i thank to do it with MediaElement, but my videos are not only wmv.

So, i think to use <video> html tag to play video. But, is it possible to include dynamically a <video> from Silverlight (at OnClick on a movie for example) in my current webPage ?

 

If yes, how and if no, do you have an other idea to do that ?

 

Regards,

Guillaume

TomGiam
TomGiam

Participant

Participant

788 points

220 Posts

Re: Include a HTML tag (video) from Silverlight App in a webpage

You could try:

  1. HyperlinkButton
  2. System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(URL), "__blank");  //where URL is the URL of video

Tom

 

CARNIBAL06
CARNIBAL06

Member

Member

0 points

5 Posts

Re: Re: Include a HTML tag (video) from Silverlight App in a webpage

 Ok.

 

On MSDN, i found this method : System.Windows.Browser.HtmlPage.PopupWindow

What differences with Window.Navigate ?

 Which is the better ?

 

Regards,

Guillaume

TomGiam
TomGiam

Participant

Participant

788 points

220 Posts

Re: Re: Include a HTML tag (video) from Silverlight App in a webpage

Some browsers will open a new tab with Navigate and a new window with PopupWindow.

Tom

 

glsp
glsp

Member

Member

576 points

110 Posts

Re: Re: Include a HTML tag (video) from Silverlight App in a webpage

Another alternative is to use an html host control for silverlight. Will allow you to display your videos "inside" your silverlight app', no need to navigate away or show a new browser window. There's a few of them out there but this one is free:

http://www.divelements.co.uk/silverlight/tools.aspx

CARNIBAL06
CARNIBAL06

Member

Member

0 points

5 Posts

Answered Question

Re: Re: Include a HTML tag (video) from Silverlight App in a webpage

 Thanks for your helps.

 

This two solutions are very interesting. I will try both.

 

Regards,

Guillaume

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities