I try to implement the HTMLPlaceHolder in my application but I run into the following problems
- In Blend I get the error: "HTMLPage_NotEnabled"
- When I run the application, the following text is displayed: "RadHTMLPlaceHolder requires the Windowless parameter of the Silverlight application to be true"
Can you help me with this one ?
Thanks,
Nicolas
37 Answers, 1 is accepted
The first issue you encountered is a known design-time problem in Blend which we are currently working on. It should not affect writing code for your application and run-time experience.
The second message you get means that you should set yout Silverlight plugin to Windowless mode in your host ASP.NEt page:
<
asp:Silverlight ID="Xaml1" Windowless="true" ...
Let me know if this solves the problem.
Sincerely yours,
Tihomir Petkov
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Why by default it is set to false ??
-Rajesh
check this article:
http://blogs.msdn.com/silverlight_sdk/archive/2008/11/12/limitations-of-windowless-mode-for-silverlight.aspx
Kind regards,
Valentin.Stoychev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
How you are setting it? Are you sure its applied when you run the application? If you set it into the Html page it will be replaced from Visual Studio on build.
Greetings,
Valentin.Stoychev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="800px" height="600px">
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="Windowless" value="True" />
<param name="minRuntimeVersion" value="3.0.40818.0" />
<param name="autoUpgrade" value="true" />
How you are setting it? Are you sure its applied when you run the application? If you set it into the Html page it will be replaced from Visual Studio on build.
All the best,
Valentin.Stoychev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="800px" height="600px">
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="Windowless" value="True" />
<param name="minRuntimeVersion" value="3.0.40818.0" />
<param name="autoUpgrade" value="true" />
This is strange and unexpected. Can you open a support ticket and attach the project so we can debug it.
Thank you in advance for your cooperation.
Greetings,
Valentin.Stoychev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="Windowless" value="True" />
<param name="minRuntimeVersion" value="3.0.40818.0" />
<param name="autoUpgrade" value="true" />
This is a limitation in the SL framework - in windowless mode you can't use some languages.
Sincerely yours,
Valentin.Stoychev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
There is no way until the framework starts to support this scenario.
All the best,
Valentin.Stoychev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
If you guys are waiting on a framework change, what did C1 do to get it figured out?
If you refer to the produced content from the editor - we have this implemented also. Please check this demo and import/export html or even word (docx) documents:
http://demos.telerik.com/silverlight/beta/#RichTextBox/MSWord
Teh difference is that the html is imported and transformed into XAML and then it is rendered in the Silverlight page. This is how the C1 demos is implemented also. This works for the editor scenarios, but for more complex scenario like displaying an external page or interaction with the javasctipt will fail.
P.S: One a side we just released a very cool new tool for Silverlight! If you want to reduce the size of your Silverlight application, you should check our latest Silverlight tool online - Assembly Minifier (http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx).
Greetings,
Valentin.Stoychev
the Telerik team
I'll try to explain my situation.
My application allows the user to search for and browse results from a SharePoint where some of the metadata fields are stored as HTML. My SearchViewResults.xap has a ItemsControl that displays returned records. Originally, the row template included the Telerik HTMLPlaceholder control to display two "rich multiline text fields" from SharePoint that contain HTML content. The HTMLPlaceholder was bound to the appropriate properties to pull in the html content.
However, the QA process uncovered poor performance and layout issues associated with the browser trying to render the HTML on a different layer (when windowless=true). Scrolling the results or loading a new page of results causes the html to be rendered offset from the Silverlight content for a time then "snap into place" a couple seconds later (sometimes later). Frequent and continued scrolling turns into a mess of overlaid text on the screen.
I've seen a large number of blog/forum/comments asking for in-browser HTML rendering without the penalty of windowless mode. The only solutions I've seen recently are:
- write my own control allowing binding to a HTML value and then converting it to XAML for display mode. OR
- use the new SL4 webbrowser control ... but it requires OOB mode to function. We cannot assume this.
- C1RichTextBox
I would think a key capability in Silverlight would be to display rich text from HTML content without the performance burden of the windowless=true parameter. Notice I didn't say "edit" the rich text. If it needs to convert to XAML internally then so be it. I understand the difficulties of convert 100% of possible HTML markup and content ... but doing the most common would be be a great stopgap until the Silverlight framework provides such functionality. Isn't that one the tenants of a 3rd-party control provider?
Yesterday, I replaced the Telerik HTMLPlaceholder with the trial C1 C1RichTextBox and did a Binding on the HTML property:
<C1:C1RichTextBox Grid.Column="2" Grid.Row="10" x:Name="C1Snippet" Html="{Binding Path=Snippet}" Background="Transparent" FontStyle="Italic" ScrollViewer.VerticalScrollBarVisibility="Auto" MaxHeight="52" MinHeight="32" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,4,4,4" c1:C1NagScreen.Nag="True" />
One line of XAML change. Everything compiled and worked like a charm. After removing the Windowless=true parameter, the whole application was responsive and worked well.
After your prompt reply, I decided to do the same with the Telerik RadEditor:
<telerikEdit:RadEditor Grid.Column="2" Grid.Row="10" x:Name="rtfSnippet" Html="{Binding Path=Snippet}" Background="Transparent" FontStyle="Italic" ScrollViewer.VerticalScrollBarVisibility="Auto" MaxHeight="52" MinHeight="32" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,4,4,4" />
Everything compiled and ... didn't work:
Line: 56
Error: Unhandled Error in Silverlight Application
Code: 4004
Category: ParserError
Message: The invocation of the constructor on type 'Telerik.Windows.Controls.RadEditor' that matches the specified binding constraints threw an exception.
File:
Line: 612
Position: 48
In searching the forum for "binding" on the editor I found: binding the Editor UI
One of our goals in for the future versions is to provide a very easy approach to adding and binding editor UI and further customization to tune it up for any scenario.
Let me know if you have more questions.
Regards,
Mike
the Telerik team
Apparently the RadEditor cannot do binding on the content. Correct me if I'm wrong.
Best Regards,
Paul from Minneapolis
RadHtmlEditor (former RadEditor) is a control that was build using the underlying web-browser to edit HTML. The technology used has lots of limitations in Silverlight environment and this is why we introduced a totally different control - RadRichTextBox:
Here is some more info about this control:
http://www.telerik.com/products/silverlight/richtextbox.aspx
http://blogs.telerik.com/blogs/posts/10-04-16/a_new_native_silverlight_4_rich_text_editor_coming_up.aspx
http://blogs.telerik.com/blogs/posts/10-06-17/what_s_new_in_the_beta_of_radrichtextbox_for_silverlight.aspx
http://www.telerik.com/help/silverlight/radrichtextbox-overview.html
RadRichTextBox has pure Silverlight word processing engine, with no dependencies to the web browser component and it is similar to MS RichTextBox, with some nice additions like importing and exporting its content from Html/DocX/Xaml and more in the near future. It is still in beta phase but still you can test it in your scenario. Even though RadRichTextBox still does not offer Html property which you can bind out of the box, still it is possible to implement this scenario using UserControl that contains RadRichTextBox and that exposes Html property.
Please find attached a sample I just prepared for you demonstrating this approach.
Let us know if we can help further.
All the best,
Mike
the Telerik team
You can set telerik:ScrollViewerExtensions.EnableMouseWheel="True" to the ScrollViewer:
<
UserControl
x:Class
=
"SilverlightApplication1.MainPage"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
ScrollViewer
Width
=
"200"
Height
=
"200"
telerik:ScrollViewerExtensions.EnableMouseWheel
=
"True"
>
<
Grid
Background
=
"Red"
Width
=
"800"
Height
=
"800"
/>
</
ScrollViewer
>
</
Grid
>
</
UserControl
>
Let me know if it works.
Sincerely yours,
Kiril Stanoev
the Telerik team
Thank you for your feedback. Is it possible for you to isolate the issue in a small sample project and send it to us. This way, if we can debug it, we will be better able to assist you.
Greetings,
Kiril Stanoev
the Telerik team
Thank you for your feedback. The updated documentation will be uploaded next week.
Let us know if we can further assist you.
Greetings,
Tina Stancheva
the Telerik team
I've tried out typing in the search box when i went to, http://demos.telerik.com/silverlight/Default.aspx?windowless=true#HtmlPlaceholder/FirstLook
Your site is also not working. How can I get the htmlplaceholder working with all the unicode characters working in the textboxes?
Is this a microsoft issue or telerik's issue?
Thanks
This is a known limitation in the Windowless mode of the Silverlight plug-in. Unfortunately there isn't much that we can do about it until the framework starts to support this scenario.
However, you can try switching off the Windowless mode whenever you need to allow characters input and switching it back on afterwords, similarly to the idea in our demo.
Best wishes,
Tina Stancheva
the Telerik team
What do you mean by "switching off the windowless mode"? Isn't this setting readonly once the page is rendered?
I meant that you can load your page in a Windowless mode when using the RadHtmlPlaceholder and reload it in a non-windowless mode otherwise. In this HtmlPlaceholder demo you can find a "Load Windowless Mode" button implementation that can better illustrate my point.
All the best,
Tina Stancheva
the Telerik team
Error 14 The type or namespace name 'HtmlFormatProvider' could not be found (are you missing a using directive or an assembly reference?)
Error 15 The type or namespace name 'HtmlFormatProvider' could not be found (are you missing a using directive or an assembly reference?)
Error 9 The name 'DocumentLayoutModes' does not exist in the current context
Error 13 The name 'DocumentLayoutModes' does not exist in the current context
Error 10 'Telerik.Windows.Documents.Model.RadDocument' does not contain a definition for 'StructureChangeCompleted' and no extension method 'StructureChangeCompleted' accepting a first argument of type 'Telerik.Windows.Documents.Model.RadDocument' could be found (are you missing a using directive or an assembly reference?)
Error 11 'Telerik.Windows.Documents.Model.RadDocument' does not contain a definition for 'StructureChangeCompleted' and no extension method 'StructureChangeCompleted' accepting a first argument of type 'Telerik.Windows.Documents.Model.RadDocument' could be found (are you missing a using directive or an assembly reference?)
Error 12 'Telerik.Windows.Documents.Model.RadDocument' does not contain a definition for 'StructureChangeCompleted' and no extension method 'StructureChangeCompleted' accepting a first argument of type 'Telerik.Windows.Documents.Model.RadDocument' could be found (are you missing a using directive or an assembly reference?)
The code your are trying to build is outdated, as it was posted when RadRichTextbox was still in beta. If you are trying to bind it to show HTML data, you could use our data providers, namely HtmlDataProvider.
Greetings,
Boby
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
In mean time any sample code to achieve this will be greatly appreciated
Thanks,
Mallikarjun.
I also have a requirement where i need to dynamically create the control instances. I assume there should not be issues with programmatic access to the data providers.
Are there any benifits of "RadHTMLPlaceHolder" over the rad rich textbox with data providers. Can we think radhtmlplaceholder as Obsolete and stop using in our code?
Thanks,
Mallikarjun
It's good to hear that you have managed to get data binding with RadRichTextBox working. There should not be any issues with the data providers in code-behind. One thing you should have in mind is that if their DataContext is changed and they are not added to the visual tree, they will not be notified. Therefore, if you will be changing their DataContext, you must add the providers to the visual tree. This should not present a concern, as they have no visual representation and will not have an effect on the layout or the performance.
As for RadHtmlPlaceHolder, you are right, it has been obsoleted and RadRichTextBox is the control that has the closest features. You should have in mind, though, that HtmlFormatProvider (which HtmlDataProvider uses internally) cannot maintain the HTML input on import/export, i.e. once you import an HTML string/stream, it is no longer kept in memory. A RadDocument is created out of it, following the structure specified in the HTML file as close as possible. On export, an entirely different HTML is generated, which can have little in common with the initial input. Hopefully, you will find the way RadRichTextBox works suitable for your project.
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I will go ahead & implement this in rest of my modules.
Has this still not been fixed? Is the HTMLPlaceHolder obsolete now?
RadHtmlPalceHolder is still obsolete, as explained in my previous reply. The limitation with the WindowLess parameter cannot be overcome.
The control that is closest to RadHtmlPlaceHolder in terms of functionality is RadRichTextBox - a rich text box, which can import/export its content from/to HTML and a number of other formats. However, it is not a browser, so you should check if it covers the requirements of your project before using it.
You can look through the documentation of the rich text box here and if you have any questions about the control, please post them in the forum of the control.
Regards,
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Thanks for the response - I didn't read the part early on this post about the control being obsolete. We have got the RadHTMLPlaceHolder control working now, but could you tell us why it has been obsoleted? There doesn't seem to be another control that can act as a browser (which is what we need).
Thanks
It seems there's been a misunderstanding. At this point the HtmlPlaceholder isn't obsolete. You can definitely use it in your application, but you need to keep in mind its limitations - the windowless mode and its positioning above the Silverlight plug-in. These are limitations, which at this point we can't overcome, so you need to carefully plan if the HtmlPlaceholder is the best choice for your scenario. Also, in Silverlight 5 you can use the WebBrowser control in applications running with elevated permissions to display external pages in the browser.
All the best,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.