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

RadPane HeaderTemplate problem unpinned

3 Answers 220 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Guillaume
Top achievements
Rank 1
Guillaume asked on 26 Jul 2013, 09:57 AM
Hi everyone,

I'm in front of a strange issue...
I develop a WPF application with Prism/MEF and MVVM pattern, for this one I'm using the Docking control.

As Prism pattern usecase, I have region with many views, those views are not UserControl but RadPanel.
For every views, I'm using a HeaderTemplate to bind a header title and tooltip.

Here's the view code (MyView.xaml) :
<telerik:RadPane Style="{StaticResource RadPaneHeaderStyle}">

And the HeaderTemplate code (App.xaml) :
<Style x:Key="RadPaneHeaderStyle" TargetType="telerik:RadPane">
    <Setter Property="Header" Value="{Binding HeaderTitle, Mode=TwoWay}" />
    <Setter Property="HeaderTemplate">
        <Setter.Value>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding}" ToolTip="{Binding}" />
                </StackPanel>
            </DataTemplate>
        </Setter.Value>
    </Setter>
</Style>

It's working corretly in the DocumentHost region (default position), but when I move the window to Anchor it anywhere else, pinned and unpinned, style of all the window is changed... Please see the attached image for illustration.

Anyone have a solution for this problem ?
Thanks in advance.

Regards.

Guillaume


3 Answers, 1 is accepted

Sort by
0
Accepted
Vladi
Telerik team
answered on 31 Jul 2013, 12:15 PM
Hello,

In order to customize the HeaderTemplate of the Panes in the Docking control in all states (docked in and out of the DocumentHost) you will need to:
  1. Customize the RadPaneStyle's HeaderTemplate in order to customize the docked in the DocumentHost of the control Panes.
  2. Customize the PaneHeaderStyle's Template for the docked out of the DocumentHost Panes.

Unfortunately settings a ToolTip to the Header of the floating Pane in the current version of RadDocking is not supported. The reason is that when a Pane is made floating its content is placed inside a ToolWindow which inherits from RadWindow which on its side inherits from the basic Window in WPF. In the WPF platform settings the ToolTip property of a Window will not add a Tooltip to the Header part of the control, which is limitation of the framework that is transferred to the ToolWindow and RadWindow.

I created and attached a sample project for you that shows how to customize the previously mentioned HeaderTemplate and PaneHeaderStyle's Template, hope this is helpful.


Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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
Guillaume
Top achievements
Rank 1
answered on 02 Aug 2013, 09:42 AM
Hi Vladi,

Thanks for your answer, it's working for static RadPane.
But I'm using dynamic RadPane, displayed in a RadPaneGroup (prism region), so in my case the
Style TargetType="telerikDocking:RadPane"

in App.xaml is not working...
0
Guillaume
Top achievements
Rank 1
answered on 02 Aug 2013, 10:43 AM
I just checked to implement the override of "dock:PaneHeader" style and it's finally working!
Thanks :)
Tags
Docking
Asked by
Guillaume
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Guillaume
Top achievements
Rank 1
Share this question
or