RadHtmlPlaceholder goes outside the framework of the RadTileViewItem. When we resize the RadTileViewItem.

8 posts, 0 answers
  1. wanlop
    wanlop avatar
    16 posts
    Member since:
    Nov 2010

    Posted 09 Apr 2012 Link to this post

    Hi Telerik,

    We encountered a problem during the upgrade our project. We changed control from the version "2010.3.1314.1040" to "2012.1.215.1050".

    We found that when we resize the RadTileViewItem.
    While we use RadHtmlPlaceholder as the content of RadTileViewItem.
    The RadHtmlPlaceholder will goes outside the framework of the RadTileViewItem.

    Initially I found, When we set of properties "ResizingDuration" and "ReorderingDuration" is 0, we will not encounter this problem occurs.

    You can see this problem from the program that i provided.

    RadHtmlPlaceholder_Issue

    Please advise me for this problem.

    Best Regards,
    Ball
  2. wanlop
    wanlop avatar
    16 posts
    Member since:
    Nov 2010

    Posted 10 Apr 2012 Link to this post

    Hi,

    Sorry i'm forgot to let you know.
    You can test by double click at the title of "RadTileViewItem" to maximize.

    Best Regards,
    Ball




  3. DevCraft banner
  4. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 11 Apr 2012 Link to this post

    Hello wanlop,

     Since Silverlight renders HTML only on top of the plugin (actually the browser is rendering the html) it will always have problems with the layout of other controls. The best solution for you is to handle the TileView.TilePositionChanged event and hide the according HtmlPlaceHolder control and once the manipulation is over - show the html again. 
    Please let us know if this solution doesn't work for you.

    All the best,
    Miro Miroslavov
    the Telerik team

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

  5. wanlop
    wanlop avatar
    16 posts
    Member since:
    Nov 2010

    Posted 11 Apr 2012 Link to this post

    Hi Miro,

    I tried follow your suggestions but it doesn't work.

    Can you give an example code for the solution ?

    Best Regards,
    Wanlop
  6. wanlop
    wanlop avatar
    16 posts
    Member since:
    Nov 2010

    Posted 12 Apr 2012 Link to this post

    Hi Miro,

    I understand this control will be render into the html tag (div and ifram).

    When I checked width properties at these html tag during runtime at the event "LayoutUpdated" of RadThmlPlaceholder.

    I found that values doesn't match.

    The Ifram value ​​seem to have changed follow the size of RadTileViewItem.
    The div value​​ seems that it is the PreviousSize value.

    Below is the code that I use it to validate the value of the html tag.

     

     

     

    HtmlElement div = ((RadHtmlPlaceholder)RH1).HtmlPresenter;

     string _dwidth = div.GetStyleAttribute("width");

     string _iwidth = ((HtmlElement)(div.Children[0])).GetStyleAttribute("width");

     

  7. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 13 Apr 2012 Link to this post

    Hello wanlop,
    The problem is that you can't (well, you can but the result is not good) use render transformations to move or animate an IFrame (the RadHTMLPlaceholder is using one). You have two workarounds for this issue:
    - disable the animations of the RadTileView:
    Copy Code
    <telerik:RadTileView x:Name="myTileView"
    IsItemsAnimationEnabled="False"
    ... >
    - handle a couple of events and hide the RadHTMLPlaceholder during the animations (you can just collapse it or use the RadFluidContentControl to show something else on its place)
    I've attached a sample project which shows one way to do this so could you examine it and if you have more questions please feel free to ask.

    Greetings,
    Zarko
    the Telerik team

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

  8. wanlop
    wanlop avatar
    16 posts
    Member since:
    Nov 2010

    Posted 17 Apr 2012 Link to this post

    Hi Zarko,

    I have tested your example and your solutions already.
    I think it should be ok.

    Thanks for your suggestions.

    I have a little doubt.
    Why we don't have this issue at the version. "2012.1.215.1050" ?

    Best Regards,
    Wanlop
  9. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 19 Apr 2012 Link to this post

    Hi wanlop,
    I guess you meant that you don't have this problem with version 2010.3.1314.1040 not 2012.1.215.1050? If this is the case - in this version(and earlier) the Maximize/Restore animations are DoubleAnimations which means that on every pixel the whole content of the RadTileViewItems is remeasured and rearranged and this helps the RadHTMLPlaceholder place itself correctly but it's a very heavy operation(especially if you have a lot of RadTileViewItems and/or they have something more than a couple of buttons in their content) and that's why we changed it in the later releases.
    If you have further questions please feel free to ask.

    Kind regards,
    Zarko
    the Telerik team

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

Back to Top
DevCraft banner