HTMLPlaceHolder content disappear when closing RadPane

3 posts, 1 answers
  1. Patrik
    Patrik avatar
    56 posts
    Member since:
    Jul 2010

    Posted 26 Aug 2013 Link to this post

    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:

    The HTMLPlaceHolder control is defined inside a DataTemplate of an ItemsControl like this:
    <ItemsControl ItemsSource="{Binding PuffSizeItems}">
          <StackPanel Margin="0 0 0 15" Orientation="Vertical"
              <Run Text="{Binding Name}" />
              <Run Text=" (" />
              <Run Text="{Binding OriginalWidth}" />
              <Run Text="x" />
              <Run Text="{Binding OriginalHeight}" />
              <Run Text=")" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
              <Border Grid.Row="0" Grid.Column="0"
              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}"
                KeepContentInMemory="True" />
              <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" />
            <TextBlock Grid.Column="0" Grid.Row="0"
            Text="{Binding IsAutoPuff,Converter={StaticResource BooleanAutoPuffToStringConverter}}" />

    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. Answer
    Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1237 posts

    Posted 29 Aug 2013 Link to this post

    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.

    Pavel R. Pavlov
    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 >>
  3. Patrik
    Patrik avatar
    56 posts
    Member since:
    Jul 2010

    Posted 29 Aug 2013 Link to this post

    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,
Back to Top