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:
    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. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 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.

    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 >>
  3. DevCraft banner
  4. 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,
    Patrik
Back to Top