HTMLPlaceHolder Offsets Incorrectly

4 posts, 0 answers
  1. James
    James avatar
    9 posts
    Member since:
    Nov 2007

    Posted 20 Jul 2010 Link to this post

    I have an HTMLPlaceholder in a RadWindow that loads content from an external source. The RadWindow is modal. Here is a code snippet:

    <telerikNavigation:RadWindow x:Name="radWindow" Width="1200" Height="630" CanClose="True" CanMove="False" ResizeMode="NoResize" ModalBackground="#5D7C7373" WindowStartupLocation="CenterScreen" Closed="radWindow_Closed">
                <StackPanel>
                    <telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder1" SourceUrl="Blank.htm" RespectSilverlightLayoutMeasure="True" Height="550"></telerik:RadHtmlPlaceholder>
                    <Border BorderThickness="2" Width="1400" BorderBrush="#FFEAEAEA" />
                    <Button x:Name="btnCloseWindow" Height="20" Width="100" Content="Close Window" Click="btnCloseWindow_Click"  VerticalAlignment="Bottom" Margin="10,10,10,10" />
                </StackPanel>
    </telerikNavigation:RadWindow>

    Sometimes (not always), the content of the HTMLPlaceHolder gets offset slightly. Always down and to the right... I include a screen grab that illustrates this. This can happen on load, or can happen when the content of the HTMLPlaceHolder loads a new page (internal to the displayed site, not by changing the content in Silverlight).

    Any ideas?

    I did go back and verify that if I removed all the other controls from the RadWindow that the problem does in fact still occur.
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 21 Jul 2010 Link to this post

    Hello James,

    Thank you for reporting this. We verified it and it is reproducible. We have logged the issue and will fix it for the next ServicePack. I updated your telerik points.

    Regards,
    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
  3. DevCraft banner
  4. James
    James avatar
    9 posts
    Member since:
    Nov 2007

    Posted 21 Jul 2010 Link to this post

    Hi,

    1: Do you have an expected date for the next SP?
    2: Based on your understanding of the issue are there any approaches you can suggest to mitigate this problem? Does it always move by the same amount for example? If I gave it enough space within the radwindows that movement wouldn't cause overlap?
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 23 Jul 2010 Link to this post

    Hello James,

    Yes - the next service pack is shceduled for the first half of August.

    what we found-out is that the first time the window is displayed - there is no problem. The problem is seen on a subsequent open of the Window and yes the offset is always the same - e.g. ~20 px on the left and ~10 px on top.

    You can workaround it in the following way:


    private void Button_Click_1(object sender, RoutedEventArgs e)
            {
                RadWindow1.ShowDialog();
                RadWindow1.Activated += new EventHandler(RadWindow1_Activated);
            }
      
            void RadWindow1_Activated(object sender, EventArgs e)
            {
                RadHtmlPlaceholder1.InvalidateMeasure();
                RadHtmlPlaceholder1.InvalidateArrange();
                RadHtmlPlaceholder1.UpdateLayout();
            }
    Regards,
    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
Back to Top