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

WindowLess parameter must be true

37 Answers 896 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
NS
Top achievements
Rank 1
NS asked on 03 Apr 2009, 11:11 AM
Hi,
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

Sort by
0
Tihomir Petkov
Telerik team
answered on 03 Apr 2009, 11:17 AM
Hello Nicolas,

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.
0
Rajesh
Top achievements
Rank 1
answered on 02 Dec 2009, 12:20 PM
What is advantage and disadvantage of setting WindowLess parameter to "true".

Why by default it is set to false ??

-Rajesh
0
Valentin.Stoychev
Telerik team
answered on 02 Dec 2009, 03:19 PM
Hi 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.
0
sachin jagtap
Top achievements
Rank 1
answered on 29 Dec 2009, 08:08 AM
I tried setting windowless param to true, but still i am getting the same error message...
0
Valentin.Stoychev
Telerik team
answered on 29 Dec 2009, 08:52 AM
Hi sachin jagtap,

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.
0
Champcbg
Top achievements
Rank 1
answered on 31 Jan 2010, 12:39 AM
this is the code i have and i am still getting the same error about the windowless parameter.  what could the problem be?

<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" />
0
Valentin.Stoychev
Telerik team
answered on 01 Feb 2010, 08:23 AM
Hi c,

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.
0
Champcbg
Top achievements
Rank 1
answered on 01 Feb 2010, 10:19 AM
yes i am setting these parameters directly on the aspx page.

<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" />
0
Valentin.Stoychev
Telerik team
answered on 01 Feb 2010, 11:45 AM
Hi c,

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.
0
Hưng Phạm
Top achievements
Rank 1
answered on 12 Mar 2010, 05:52 AM
dear admin
I 'm using trial version silverlight control of your company. Please, help me.
<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" />
I added "<param name="Windowless" value="True" />" but the seem it other error. I can't type VietNam's language on silverlight in my application. When I remove "<param name="Windowless" value="True" />" then it is good.
how do I?
0
Valentin.Stoychev
Telerik team
answered on 12 Mar 2010, 07:22 AM
Hello Hưng Phạm,

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.
0
Hưng Phạm
Top achievements
Rank 1
answered on 12 Mar 2010, 07:40 AM
so! can I not use RadHtmlPlaceHolder? because it impact to my application,do you know any way??
0
Valentin.Stoychev
Telerik team
answered on 12 Mar 2010, 07:47 AM
Hi Hưng Phạm,

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.
0
Paul
Top achievements
Rank 1
answered on 17 Jun 2010, 02:32 AM
I'm looking at the ComponentOne RichTextBox sample.  It does not require windowless=true yet it is displaying HTML (and RTF) just fine.  I have an application that desperately needs to NOT use windowless=true for performance reasons.  I tried the HTMLPlaceHolder but when animations kick in, the control instances render seconds after the rest of the page.

If you guys are waiting on a framework change, what did C1 do to get it figured out?
0
Valentin.Stoychev
Telerik team
answered on 17 Jun 2010, 09:49 AM
Hi Paul,

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
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
0
Paul
Top achievements
Rank 1
answered on 17 Jun 2010, 06:48 PM
Hi Valentin,

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:
  1. write my own control allowing binding to a HTML value and then converting it to XAML for display mode.  OR
  2. use the new SL4 webbrowser control ... but it requires OOB mode to function.  We cannot assume this.
  3. 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

0
Mike
Telerik team
answered on 18 Jun 2010, 05:40 PM
Hi Paul,

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
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
0
Ian
Top achievements
Rank 1
answered on 23 Nov 2010, 07:11 AM
This is a super annoying problem - having to run Silverlight in windowless mode is also causing the side effect of mouse wheel no longer working in FireFox and Chrome. Is there a Telerik control that I can use in place of the stock Silverlight  ScrollViewer control that will still work with FireFox in Silverlight Windowless mode? If so I'd really appreciate an example. I'm using SL4 with the 2010.3.1110.1040 version of your kit.
0
Kiril Stanoev
Telerik team
answered on 23 Nov 2010, 09:24 AM
Hello Ian,

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
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Ian
Top achievements
Rank 1
answered on 24 Nov 2010, 06:24 AM
It seems to work intermittently. Initially when using the mousewheel with the new settings I get an error reported in FireFox: "Error calling method on NPObject!" which goes away after I click around a bunch and navigate between pages - then mouse wheel starts working. Unfortunately not much detail is provided beyond that.
0
Kiril Stanoev
Telerik team
answered on 26 Nov 2010, 09:24 AM
Hello Ian,

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
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Ian
Top achievements
Rank 1
answered on 30 Nov 2010, 06:40 PM
You're solution actually did fix the problem. The missing link was that I needed to have the enableHtmlAccess Silverlight plugin attribute turned on. You might want to update your documentation with this information when forced to run in windowless mode.
0
Tina Stancheva
Telerik team
answered on 03 Dec 2010, 12:33 PM
Hi Ian,

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
Browse the videos here>> to help you get started with RadControls for Silverlight
0
thdwlgP
Top achievements
Rank 1
answered on 06 Jan 2011, 10:28 PM
Setting windowless parameter to true is breaking all the textboxe's in firefox, chrome etc with unicode characters. I cant type spanish/russian/korean etc. (It only works in IE)

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
0
Tina Stancheva
Telerik team
answered on 11 Jan 2011, 05:14 PM
Hi NS,

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
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
hightow
Top achievements
Rank 1
answered on 30 Jun 2011, 02:57 PM
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.

What do you mean by "switching off the windowless mode"? Isn't this setting readonly once the page is rendered?

0
Tina Stancheva
Telerik team
answered on 05 Jul 2011, 11:44 AM
Hello Hightow,

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
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
0
Mallikarjun
Top achievements
Rank 1
answered on 01 Nov 2011, 07:06 AM
I am unable to build the sample. I am using 2011.2.712.1040 version. I get the below errors


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?)

0
Boby
Telerik team
answered on 04 Nov 2011, 08:41 AM
Hi Mallikarjun,
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 >>

0
Mallikarjun
Top achievements
Rank 1
answered on 04 Nov 2011, 08:43 AM
Thanks. Let me try.
In mean time any sample code to achieve this will be greatly appreciated

Thanks,
Mallikarjun. 
0
Mallikarjun
Top achievements
Rank 1
answered on 04 Nov 2011, 11:01 AM
Thanks i got it working with the dataproviders. 
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
0
Iva Toteva
Telerik team
answered on 08 Nov 2011, 06:06 PM
Hi 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.

All the best,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Mallikarjun
Top achievements
Rank 1
answered on 09 Nov 2011, 06:06 AM
In my scenarios, data to the RichTextBox is read only & it will never change for that session and also i don't require Impor/Export functionality of that data. 
I will go ahead & implement this in rest of my modules.
0
Pete
Top achievements
Rank 1
answered on 29 Aug 2012, 08:04 PM
I have this problem using the HTMLPlaceHolder with windowless set to true also.
Has this still not been fixed? Is the HTMLPlaceHolder obsolete now?
0
Iva Toteva
Telerik team
answered on 31 Aug 2012, 03:41 PM
Hello Pete,

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.

0
Pete
Top achievements
Rank 1
answered on 31 Aug 2012, 03:47 PM
Hi
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
0
Tina Stancheva
Telerik team
answered on 05 Sep 2012, 12:11 PM
Hello Pete,

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.

Tags
HTMLPlaceHolder
Asked by
NS
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
Rajesh
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
sachin jagtap
Top achievements
Rank 1
Champcbg
Top achievements
Rank 1
Hưng Phạm
Top achievements
Rank 1
Paul
Top achievements
Rank 1
Mike
Telerik team
Ian
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Tina Stancheva
Telerik team
thdwlgP
Top achievements
Rank 1
hightow
Top achievements
Rank 1
Mallikarjun
Top achievements
Rank 1
Boby
Telerik team
Iva Toteva
Telerik team
Pete
Top achievements
Rank 1
Share this question
or