Rendering HTML Content within Silverlight application

依然范特西╮ 提交于 2019-12-12 09:53:41

问题


In one of our application it is required to display bullet list in one of the Silverlight 2.0 container. We have decided to use HTML markup text for the same. While there are number of options available on Google like overlaying HTML div container etc., I would like to know what is the most workable way of doing this.


回答1:


I think the easiest will be to use some 3-rd party solution. For example, Telerik has an HtmlPlaceholder that allows you to display html pages inside Silverlight application. You can see a demo here: http://demos.telerik.com/silverlight/#HtmlPlaceholder/FirstLook

This is how you can use it:

<Grid>
    <telerik:RadHtmlPlaceholder SourceUrl="http://google.com" />
</Grid>



回答2:


It seems like a lot of trouble to display a bulleted list, you can do that in native Silverlight

http://www.codeproject.com/KB/silverlight/OrderedList_Silverlight.aspx

Otherwise, you can do this:

Blend HTML and Silverlight controls together

Which is what I think you are alluding to in your question




回答3:


If you don't need to have clickable hyperlinks, take a look at this:

http://blogs.msdn.com/delay/archive/2007/09/10/bringing-a-bit-of-html-to-silverlight-htmltextblock-makes-rich-text-display-easy.aspx



来源:https://stackoverflow.com/questions/1172278/rendering-html-content-within-silverlight-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!