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

HTMLPlaceHolder content disappear when closing RadPane

2 Answers 24 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Patrik
Top achievements
Rank 1
Patrik asked on 26 Aug 2013, 02:26 PM
My application uses RadDocking to create RadPanes. Each RadPane contains a HTMLPlaceHolder control.

Problem 1. When I load the first and the second RadPane it works but when I close one pane then the other pane doesn’t show anything inside HTMLPlaceHolder. It is just a white page inside.

Problem 2. When the first problem happens and I try to create a new RadPane. HTMLPlaceHolder doesn’t show anything.

I have tried the following examples, but none of them work:
http://www.telerik.com/community/forums/silverlight/htmlplaceholder/disappear-when-using-inside-raddocumentpane-docking-tabs.aspx 
http://www.telerik.com/community/forums/silverlight/docking/raddocumentpane-closed-or-hidden.aspx

The HTMLPlaceHolder control is defined inside a DataTemplate of an ItemsControl like this:
<ItemsControl ItemsSource="{Binding PuffSizeItems}">
  <ItemsControl.ItemTemplate>
    <DataTemplate>
      <StackPanel Margin="0 0 0 15" Orientation="Vertical"
      HorizontalAlignment="Left">
        <TextBlock>
          <Run Text="{Binding Name}" />
          <Run Text=" (" />
          <Run Text="{Binding OriginalWidth}" />
          <Run Text="x" />
          <Run Text="{Binding OriginalHeight}" />
          <Run Text=")" />
        </TextBlock>
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
          </Grid.ColumnDefinitions>
          <Border Grid.Row="0" Grid.Column="0"
          HorizontalAlignment="Left"
          Style="{StaticResource StandardToolbarStyle}"
          Width="{Binding BorderWidth,Converter={StaticResource BorderAddSizeConverter}}"
          Background="White" BorderThickness="1"
          Height="{Binding BorderHeight,Converter={StaticResource BorderAddSizeConverter}}">
 
            <telerik:RadHtmlPlaceholder DataContext="{Binding}"
            Width="{Binding PlaceholderWidth}"
            Height="{Binding PlaceholderHeight}"
            SourceUrl="{Binding PuffPreviewUrl}"
            Loaded="RadHtmlPlaceholder_Loaded"
            KeepContentInMemory="True" />
          </Border>
          <telerik:RadButton Grid.Row="0" Grid.Column="1"
          DataContext="{Binding}" BorderThickness="0" Padding="0"
          Margin="5 0 0 0" Background="Transparent"
          VerticalAlignment="Top" Click="SettingsRadButton_Click">
            <Image Source="../../Assets/Images/UI/Icons/settings.png"
            Width="16" Height="16" Stretch="Fill" />
          </telerik:RadButton>
        </Grid>
        <TextBlock Grid.Column="0" Grid.Row="0"
        Text="{Binding IsAutoPuff,Converter={StaticResource BooleanAutoPuffToStringConverter}}" />
      </StackPanel>
    </DataTemplate>
  </ItemsControl.ItemTemplate>
</ItemsControl>

I am using version 2012_2_1009 and I can't easily upgrade to the latest version because of breaking changes and a lot of modules that needs modifications, so any suggestions for workarounds is happily accepted!

2 Answers, 1 is accepted

Sort by
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 29 Aug 2013, 09:19 AM
Hi Patrik,

I see that you use outdated binaries. Please note that we strongly suggest to our clients to use the latest official release so that they will be able to get advantage of the latest fixes and newest features of our controls.

However, in order to achieve your requirements, you can try subscribing to the Loaded event of the RadHtmlPlaceholder control and in its handler you can call the RaiseLayoutChange() method which is implemented in the project from the referenced forum post.

For your convenience I changed the implementation of that project so you can copy-paste the workaround into your application. Please take a look at the attached solution and let me know if this workaround fits your scenario.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Patrik
Top achievements
Rank 1
answered on 29 Aug 2013, 12:03 PM
Thanks, it seems to work somewhat now. Sometimes I need to switch pane twice, before it loads. But it's better than nothing. Hopefully we can get some time to upgrade our binaries soon!

Best regards,
Patrik
Tags
HTMLPlaceHolder
Asked by
Patrik
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Patrik
Top achievements
Rank 1
Share this question
or