Styling RadPaneGroup

9 posts, 1 answers
  1. Andrew
    Andrew avatar
    29 posts
    Member since:
    Oct 2010

    Posted 01 Aug 2011 Link to this post

    How do I make the (dock type/pin/close) buttons visible only when the mouse is inside the corresponding control? Is there a pre-configured style that does it?

    Thanks!
    -Andrew
  2. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 04 Aug 2011 Link to this post

    Hello Andrew,

    This is not supported out of the box and is not an easy task. However, I have prepared a sample application in which this is illustrated, but it might have some issues.

    Hope it will help.

    Regards,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  3. DevCraft banner
  4. Andrew
    Andrew avatar
    29 posts
    Member since:
    Oct 2010

    Posted 06 Aug 2011 Link to this post

    Hi Konstantina,

    Thanks a lot for the example, this is exactly what I wanted! Awesome!

    Indeed, the solution is quite big (~800 lines on xaml), just wondering if you would consider adding it to the library as a pre-built style? It looks great and really improves user experience when there are many panes on the screen.

    Thank you!
    -Andrew
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 09 Aug 2011 Link to this post

    Hi Andrew,

    Thank you for your suggestion. We will consider include this to the style of the RadDocking control.

    Best wishes,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  6. Andrew
    Andrew avatar
    29 posts
    Member since:
    Oct 2010

    Posted 07 Nov 2011 Link to this post

    Just wondering if you decided to include it in the library?

    By the way, there is a problem with the provided code - if you undock and then dock a panel back, its content disappears.
  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 09 Nov 2011 Link to this post

    Hi Andrew,

    There was a binding missing in the style. To fix it, find the ContentControl with  x:Name="ContentBackground" and in it the ContentPresenter with x:Name="ContentElement". Set its Content property to the following: Content="{TemplateBinding SelectedContent}".

    Best wishes,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  8. Andrew
    Andrew avatar
    29 posts
    Member since:
    Oct 2010

    Posted 14 Nov 2011 Link to this post

    Hi Konstantina,

    I tried it and, unfortunately, it didn't have any effect. Here's what the corresponding section looks like:

                    <ContentControl x:Name="ContentBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Style="{StaticResource PaneGroup_PaneFrameStyle}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Border Grid.Row="0" Visibility="{Binding SelectedItem.PaneHeaderVisibility, RelativeSource={RelativeSource TemplatedParent}}">
                                <telerik:PaneHeader x:Name="HeaderElement" MinHeight="16" Grid.Row="0" SelectedPane="{TemplateBinding SelectedPane}" telerik:StyleManager.Theme="{StaticResource Theme}" Style="{StaticResource PaneHeaderStyle}"/>
                            </Border>
                            <ContentPresenter x:Name="ContentElement" ContentTemplate="{TemplateBinding SelectedContent}" Grid.Row="1"/>
                        </Grid>
                    </ContentControl>

    Thanks,
    Andrew
  9. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 17 Nov 2011 Link to this post

    Hello Andrew,

    Attached I am sending you the project modified with the suggested change, which seems to be working correctly. Could you please go through it and modify it so that the issue can be observed. Also, the section you pasted is not with added binding to the Content property of the ContentPresenter.

    Hope this helps.

    Best wishes,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  10. Andrew
    Andrew avatar
    29 posts
    Member since:
    Oct 2010

    Posted 01 Dec 2011 Link to this post

    Hi Konstantina,

    The attached example works beautifully (indeed, the problem was with Content property binding), thanks a lot!

    You are my hero :)
    -Andrew
Back to Top
DevCraft banner