This is a migrated thread and some comments may be shown as answers.

HtmlSource and SourceUrl Behavior

1 Answer 55 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Nick Clark
Top achievements
Rank 1
Nick Clark asked on 19 Jul 2011, 09:56 PM

As part of a project, I need to display HTML content in Silverlight. The content is simply HTML text with a few images.


I am evaluating different approaches including using the HtmlPlaceholder and converting the content (on demand) into a RadDocument (trying both client and server side).


In using the HtmlPlaceholder I am experiencing some odd behavior:


Setting HtmlSource

-Loads slower, sometimes with an appreciable delay where nothing happens

-Mouse scroll does not work. Occasionally scroll works at first.


Setting SourceUrl

-Loads fast

-Mouse scroll works


I was wondering if this behavior is normal.


In this application the content comes from a WCF service. My preference would be set the HtmlSource simply because it seems cleaner. The content simply binds to my view model. When the model changes, so does the HtmlPlaceholder.


I could easily display the Html content in a server side Aspx page and set the SourceUrl, if that approach is faster. But I thought I would at least see if the behavior I am experiencing is normal or something that can be worked through.

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 21 Jul 2011, 01:26 PM
Hello Nick,

We are not aware of any performance issues with RadHtmlPlaceholder when setting its HtmlSource property.
Please see the attached project and let me know if you experience any performance issues.
In its core, RadHtmlPlaceholder is just an IFrame which is rendered on top of the Silverlight plugin. Any HTML content that is given to RadHtmlPlaceholder is passed to the inner IFrame. As for the mouse issue, it is caused by the combination of the HtmlSource and windowless plugin property which has to be set in order for RadHtmlPlaceholder to work properly. If instead you use SourceUrl you won't have any issues.

My advice is to use the SourceUrl property even though it might be a little bit more cumbersome.

All the best,
Kiril Stanoev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
HTMLPlaceHolder
Asked by
Nick Clark
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or