Embed HTML or aspx pages in Silverlight

Source: Internet
Author: User

Several times, some comrades asked how to embed other pages such as HTML, aspx, and JSP pages in Silverlight. Here is a simple usage method for your reference:

Download the DLL of a third-party control. Here we provide one:

Http://download.csdn.net/source/3231944

 

The following is an introduction to this tool: Silverlight

The configuration steps are as follows:

1): Add the DLL (divelements. silverlighttools. dll) in the downloaded resource to the reference of the Silverlight project.

 

2): Right-click the toolbox, select "select item", browse to the location of the above DLL file, and click "add.

 

3): drag the newly added component to the Silverlight editing page. A reference to the namespace is automatically added.

Xmlns: divtools = "CLR-namespace: divelements. silverlighttools; Assembly = divelements. silverlighttools"

 

4): add the htmlhost component to the position to be embedded, for example:

<Grid>

<Divtools: htmlhost X: Name = "htmlplaceholderhost1" sourceuri = "http://www.baidu.com" margin = "-,-"/>

</GRID>

The sourceuri property of this control is to point to other page information, you just need to give a URI address.

 

 

5): Do not forget to add <Param name = "windowless" value = "true"/> to the Silverlight homepage, otherwise, an error "You must be using the Silverlight plugin windowless mode to use this control. ", for example:

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML xmlns = "http://www.w3.org/1999/xhtml"> 

 

 

Paste a four-screen video interface that I use this control.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.