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

RadDocumentPane Header text looses binding

1 Answer 116 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Frans
Top achievements
Rank 1
Frans asked on 10 Aug 2012, 09:22 PM
Hi,

I have a RadDocumentPane (same for RadPane) with the HeaderTemplate that has a DataTemplate as a static resource. Binding works fine with dock/undock. The issue comes in when RadDocking.LoadLayout is called. The binding is lost on the DocumentHeader (text for header).  There is no problem with the Tooltip binding on the RadDocking.LoadLayout. Can someone assist?

Thanks

<DataTemplate x:Key="RadPaneHeaderTemplate" DataType="{x:Type telerikDocking:RadPane}">
    <StackPanel Orientation="Horizontal">
        <TextBlock Text="{Binding}" ToolTip="{Binding ElementName=DocumentPane, Path=Tag, Mode=OneWay}"/>
    </StackPanel>
</DataTemplate>

 

<telerikDocking:RadDocumentPane x:Name="DocumentPane"
                                                     HeaderTemplate="{StaticResource RadPaneHeaderTemplate}" Header="{Binding Path=DocumentHeader}"
                                                     Tag="{Binding Path=DocumentToolTip}"
                                                     telerikDocking:RadDocking.SerializationTag="DocumentPane"                                                       
                                                     HorizontalContentAlignment="Left" CanUserClose="False"
                                                     DataContext="{Binding}" >

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 15 Aug 2012, 02:27 PM
Hello Frans,

We were able to reproduce it with your code, but it seems like removing DataContext="{Binding}"
from the RadDocumentPane fixes the issue. It would be great if you can give it a try and let us know if this works for you.

Kind regards,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Docking
Asked by
Frans
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or