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

HTMLPlaceHolder Offsets Incorrectly

3 Answers 66 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 20 Jul 2010, 06:34 PM
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.

3 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 21 Jul 2010, 04:08 PM
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
0
James
Top achievements
Rank 1
answered on 21 Jul 2010, 04:11 PM
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?
0
Valentin.Stoychev
Telerik team
answered on 23 Jul 2010, 10:11 AM
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
Tags
HTMLPlaceHolder
Asked by
James
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
James
Top achievements
Rank 1
Share this question
or