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

How to 'force refresh' for a RadPane header?

1 Answer 49 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Anders
Top achievements
Rank 1
Anders asked on 28 Mar 2012, 01:18 PM
Hi telerik,

We are using a RadPane for a sort of Property Editor depending on the selection in a treeview. Works well!

Now, however, we want the RadPane header to contain an image corresponding to selection in tree and it appears that RadPane header is not refreshed when the RadPane gets a new data context (before the header was a static text and we didn't need any chages to appear).

Is there a way to tell the RadPane to update it's header?

Don't know if it's relevant, but the header is formattet through a template defined in App.xaml:

<Application x:Class="Rap1D.Rap1D_WPF.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" xmlns:Controls1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls">
    <Application.Resources>
        <DataTemplate x:Key="HeaderTemplateGeometry">
            <StackPanel Orientation="Horizontal">
                <Image Source="{Binding VmImage}" Width="16" Height="16" Margin="2"/>
                <TextBlock Text="{Binding DisplayName}" Margin="2" />
            </StackPanel>
        </DataTemplate>
    </Application.Resources>
</Application>

And here is the RadPane:

<Controls:RadPane x:Class="Rap1D.Rap1D_WPF.CustomEditor.CustomEditor"
             [Stuff deleted]
             HeaderTemplate="{StaticResource HeaderTemplateGeometry}"                  
             Style="{StaticResource PaneStyle}">
             [Stuff deleted]
</Controls:RadPane>

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 30 Mar 2012, 02:05 PM
Hi Anders,

I am sending you my project where I have tried to reproduce it, but without much success. It is strange because the binding should work and you should not need to update the header manually. Can you, please check whether the binding is working properly and for example if you move, pin-unpin, dock or undock the pane whether the header is updated?

Greetings,
Georgi
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Docking
Asked by
Anders
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or